What is the difference between JPG and PNG?
They compress in opposite ways. JPG, also written JPEG, is lossy: it throws away detail the eye is least likely to miss, fine color variation above all, and keeps what matters in a photograph. PNG is lossless: it stores every pixel exactly, and makes the file smaller only by describing repetition, such as a run of the same color.
That one difference decides nearly everything else. JPG files of photographs are small and look right; PNG files of photographs are large. PNG keeps text and hard edges perfectly sharp, while JPG blurs them and leaves faint blocks and ripples, called compression artifacts, around every edge.
JPG and PNG side by side
| Compared on | JPG (JPEG) | PNG |
|---|---|---|
| Compression | Lossy: detail is discarded, more of it at lower quality | Lossless: every pixel is kept exactly |
| Transparency | None; transparent areas are filled with a color | Full, including soft edges |
| Best for | Photographs and realistic images | Screenshots, logos, text, diagrams and line art |
| File size of a photo | Small | Several times larger |
| Saving again | Loses a little more each time | Loses nothing |
| Precision | Almost always 8 bits per color channel | Up to 16 bits per color channel |
| Opens in | Everything | Everything |
Which is better quality, JPG or PNG?
PNG, in the strict sense that it never loses anything. Whether that matters depends on the picture. A photograph saved as a JPG at a sensible quality looks the same as the PNG to almost anyone, at a fraction of the size, which is why cameras and phones save lossy files. A screenshot, a logo or a page of text saved as a JPG looks visibly worse: letters grow soft halos and flat areas pick up blotches.
Converting a JPG to PNG does not bring back what JPG discarded. The JPG to PNG converter gives you a file that loses nothing more from then on, which helps if you will edit and re-save it, but the detail the JPG already dropped is gone for good.
When should you use JPG?
- Photographs for websites, email and social media, where file size matters and nobody zooms in to count pixels.
- Any photo that has to open everywhere, including in old software and on upload forms that accept nothing else.
- Printing photographs. A JPG saved at high quality is the usual choice for prints, and far easier to send than a PNG.
To turn a PNG photo into a JPG, the PNG to JPG converter asks what color should fill any transparent areas, because a JPG cannot keep them.
When should you use PNG?
- Screenshots, and anything with text in it.
- Logos, icons, diagrams and line art: flat color with hard edges.
- Anything with a transparent background, such as a logo to place on colored pages. Remove white background makes one from a logo on white.
- A master copy you will edit again, so that each save loses nothing.
What about WebP?
For images on a website, WebP often beats both. It can be lossy or lossless and keeps transparency either way, and Google's comparison found lossy WebP 25 to 34 percent smaller than JPEG, while its WebP overview puts lossless WebP 26 percent smaller than PNG. The catch is software outside the browser, some of which still will not open it. WebP vs JPG and WebP vs PNG go into the details.
Measure rather than guess: Compare image formats encodes your own image as JPG, PNG, WebP and more, on your own device, and shows the size of each.