PNG vs JPG: which to use
Use JPG for photographs and PNG for screenshots, logos, diagrams and anything with a transparent background. PNG stores every pixel exactly, which makes photo files large. JPG discards detail the eye rarely notices and is much smaller. In our test the same 4000-pixel photos averaged 12.7 MB as PNG and 515 KB as JPG at quality 82.
PNG and JPG side by side
| PNG | JPG | |
|---|---|---|
| Compression | Lossless | Lossy |
| Transparency | Yes | No |
| Animation | No | No |
| Browser support | Universally supported in every browser since the late 1990s. | Universally supported. It's been there since the first browsers. |
| Kodak photo, 768×512, average sizemeasured | 626 KB | 62 KB |
| Photo 4000 px wide, average sizemeasured | 12.7 MB | 515 KB |
| Screenshot 2880×1800, average sizemeasured | 509 KB | 182 KB |
| Encode time, photo 4000 px widemeasured | 9.2 s | 121 ms |
| Decode time, photo 4000 px widemeasured | 116 ms | 93.8 ms |
Measured rows: lossy formats at quality 82, which is the converter's default, in headless Chromium on one machine. Quality 82 is not the same visual quality in every format, and no quality metric was computed. Sizes are averages across each image set. Times are medians. PNG sizes are the source files. PNG times are for this site's PNG encoder, including its optimisation pass, and its decoder. Method and full results.
How the two formats compress
PNG is lossless. It looks for repetition, such as runs of the same colour, and stores that compactly, then reproduces the image exactly. This works very well on flat colour and badly on photographs, where almost no two neighbouring pixels are identical.
JPG is lossy. It splits the picture into small blocks and keeps less of the fine detail in each one. Photographs survive this well. Hard edges do not: text and thin lines pick up faint noise around them, and saving the same JPG again and again makes it worse each time.
What we measured
Photographs: 90% smaller as JPG than as PNG on the Kodak set, and 96% smaller on photos 4000 pixels wide.
Screenshots: 64% smaller as JPG, an average of 182 KB against 509 KB. The saving is smaller than for photos because PNG is already efficient on flat colour, and the JPG versions no longer have perfectly sharp text.
When to use PNG, and when to use JPG
Use PNG when
- The image is a screenshot, diagram, chart or anything with text in it.
- You need a transparent background.
- You will keep editing the file and do not want quality to drop with each save.
Use JPG when
- The image is a photograph.
- The file has to be small, for email, upload limits or page speed.
- It needs to open on any device or in any program without question.
Convert between them
These run in your browser. The file is not uploaded.
PNG vs JPG: common questions
PNG keeps the image exactly as it was. JPG does not. For a photo at a sensible quality setting the difference is hard to see. For text and line art it is visible.
No. The detail JPG discarded is gone. The PNG is an exact copy of the JPG's picture in a much larger file: about 7.5 times the size in our test.
JPG cannot store it. On convert.now, transparent areas are filled with white and soft edges are blended onto white.
For the web, often WebP. It supports transparency like PNG and lossy compression like JPG. See WebP vs PNG and WebP vs JPG.
Other format comparisons
Last updated