JPG vs PNG: which image format should you use?
Compare JPG and PNG compression, transparency, quality and file size so you can choose the right format for photos, graphics and websites.
The short answer
Use JPG for photographs and other images where a smaller file matters more than perfectly preserving every pixel. Use PNG for transparency, screenshots, logos, diagrams and graphics with sharp edges.
Compression and image quality
JPG uses lossy compression. It removes some visual information to reduce file size, and repeated saves can add artifacts around edges and fine detail.
PNG uses lossless compression. Saving a PNG does not introduce the same generational loss, although photographic PNGs are often much larger than equivalent JPGs.
Transparency and compatibility
PNG supports transparent and partially transparent pixels. JPG has no transparency channel, so transparent areas must be filled with a color when converting to JPG.
Both formats work in modern browsers and common software, but JPG remains the most universally accepted format for photographs.
Does JPG to PNG improve quality?
No. Conversion cannot restore detail that JPG compression already removed. A PNG copy can prevent additional lossy compression during later edits, but its starting quality is still the quality of the JPG source.
Worked decision: a product photo and a transparent logo
For a product photograph on a white page, first crop unused background and resize a copy to the intended display dimensions. Export JPG and PNG from that same source. Compare the label lettering and shadow edges at 100% zoom, then compare the downloaded byte sizes. Choose the smaller acceptable result; a PNG photograph is not automatically a better delivery file.
For a transparent logo, keep PNG when the background must show through. Inspect it against both white and dark backgrounds. A pale fringe can come from pixels blended against an old background; changing the file extension cannot repair those pixels. If a recipient requires JPG, choose the final background color before conversion.
A repeatable comparison you can do yourself
Keep dimensions constant when comparing formats. Otherwise a smaller image may appear to demonstrate better compression when it simply contains fewer pixels. Save each candidate from the original rather than converting JPG to PNG and back. Record format, width, height and file size alongside a note about the smallest readable text.
These are comparison steps, not benchmark results: the winning format depends on your actual image. Keep the source even after a delivery copy looks correct.
Side-by-side comparison
The table summarises the practical differences. Neither format is better in general; each is better at particular kinds of image.
| Property | JPG | PNG |
|---|---|---|
| Compression | Lossy: discards detail to save space | Lossless: stores every pixel exactly |
| Typical photo size | Small | Often several times larger |
| Sharp text and lines | Can show halos and smudges | Stays crisp |
| Transparency | Not supported | Full and partial transparency |
| Repeated saving | Quality drops a little each time | No loss from re-saving |
| Compatibility | Universal | Universal in modern software |
| Best for | Photographs, camera images | Screenshots, logos, diagrams, cut-outs |
How lossy compression actually works
JPG divides an image into small blocks and stores how brightness and colour change across each block. Fine changes that the eye barely notices, such as tiny variations in a sky or skin, are rounded away. The quality setting controls how aggressive that rounding is. At high settings the loss is invisible; at low settings the blocks themselves start to show, especially in smooth gradients.
This approach is excellent for photographs because real-world scenes are full of gentle variation. It works poorly on graphics with hard edges, where the sudden jump from black text to white background produces faint ripples known as ringing. That is why a screenshot of a spreadsheet saved as JPG looks slightly dirty around the numbers, while the same screenshot as PNG looks perfect.
PNG takes a different approach. It looks for repeated patterns and predictable runs of pixels and stores them more efficiently, without discarding anything. A flat-colour logo has many such patterns and compresses very well. A photograph has few, so its PNG stays large.
Decision checklist
Ask these questions in order. The first one that applies usually decides the format.
- Does the image need a transparent background? Use PNG (or WebP).
- Is it a screenshot, diagram, chart, logo or image with text? Use PNG.
- Is it a photograph that will be shared, emailed or uploaded? Use JPG.
- Will you edit and re-save the image many times before it is finished? Work in PNG, then export a JPG at the end if a smaller file is needed.
- Is it for a website where every kilobyte counts? Consider WebP, which handles both photos and transparency efficiently.
Real-world scenarios
Online shop: product photographs go up as JPG or WebP at a moderate quality, sized to the largest display width. The shop's logo in the header stays PNG or SVG so its edges remain sharp on every background.
Software documentation: interface screenshots stay PNG. Text in buttons and menus must be legible, and PNG keeps every letter crisp. If file size becomes a problem, reduce the screenshot dimensions rather than switching to JPG.
Printing family photos: send the highest-quality JPG straight from the camera, or a PNG if you have edited the photo heavily and want to avoid one more round of compression. Print labs accept both, and the visible difference in print is negligible at high JPG quality.
Email signature logo: PNG with a transparent background displays correctly in both light and dark email themes, whereas a JPG would show a coloured box behind the logo in dark mode.
Common questions
Is PNG always higher quality? Only in the sense that it does not lose anything during saving. A PNG made from a poor JPG is still poor.
Can I make a JPG transparent? Not directly. Convert to PNG and remove the background with a background tool, or recreate the graphic with transparency from the original artwork.
Why is my PNG ten times bigger than the JPG? Because it is a photograph. For photos, that size difference is normal and is the main reason JPG remains the default camera format.
Is JPEG the same as JPG? Yes. The two extensions describe the same format; .jpg became common because early versions of Windows limited extensions to three letters.
What happens when you convert between them
Converting PNG to JPG is a one-way trade. The image becomes smaller, transparency is replaced by a solid background colour, and fine detail is rounded away according to the quality setting. If you later need transparency or the original crispness, you must go back to the PNG; the JPG cannot give them back.
Converting JPG to PNG is the opposite. The file usually becomes larger, but nothing further is lost. The PNG is an exact snapshot of the JPG, including any compression artefacts already present. This is useful when an image will be edited repeatedly, because each subsequent save is lossless, but it is not a way to improve quality.
The practical rule is to keep one master copy in the best format you have, often the original camera JPG or a PNG export from your design tool, and create delivery copies from that master for each destination. Never convert back and forth between the two formats as a way of editing, because each JPG save adds a little more loss.
Screenshots, scans and other special cases
Screenshots are almost always better as PNG. They contain sharp text, flat interface colours and fine lines that JPG compression smears. A full-screen PNG screenshot is usually only a few hundred kilobytes because of all the flat colour, which PNG compresses well. If you need it smaller, reduce its dimensions rather than switching to JPG.
Scanned documents sit in between. A black-and-white text scan compresses extremely well as PNG and stays perfectly crisp. A colour scan of a magazine page with photographs behaves more like a photo and is usually more practical as JPG at high quality. If the scan will become a PDF, either works; choose based on the content of the page.
Images with gradients, such as a sunset or a soft background in a design, need care in both formats. JPG at low quality can show visible bands of colour, while PNG keeps the gradient smooth but may be large. Raise JPG quality for these images, or use WebP, which handles gradients efficiently.
Where WebP and other formats fit
JPG and PNG are no longer the only choices. WebP supports both lossy and lossless compression and transparency, and usually produces smaller files than either for the same visual quality. It is a strong default for websites, but some older desktop software and email clients still do not handle it. AVIF and HEIC compress even more efficiently, but support outside modern browsers and Apple devices is still uneven.
For files that will be emailed, printed or opened in unknown software, JPG and PNG remain the safest choices because virtually everything can open them. For images that only appear on your own website, WebP is often the better delivery format, with JPG or PNG kept as the master.