JPG vs PNG: Differences, File Size and When to Use Each

JPG and PNG are the two image formats almost every device, app and website understands. They look alike in a file browser, but they are built for opposite jobs. JPG makes photos small by quietly discarding detail you are unlikely to notice. PNG keeps every pixel exactly, and it can store transparency. Picking the right one is mostly a matter of knowing which of those two trade-offs you need.

This guide explains the difference in plain terms, shows measured file sizes from our own tests, and ends with a table you can use to decide in seconds.

The short answer

  • Use JPG for photos you want to share, upload or store, where small file size matters and you are not going to keep editing the image.
  • Use PNG for graphics: logos, icons, screenshots, diagrams, text, and anything that needs a transparent background or will be edited repeatedly.

If you are unsure, ask yourself one question: is this a photo of the real world, or something drawn on a computer? Photos lean JPG; drawn things lean PNG.

How JPG compression works

JPG (also written JPEG, after the Joint Photographic Experts Group that created it in 1992) is a lossy format. When an image is saved as JPG, the encoder:

  1. Converts colours into brightness plus two colour channels, and usually stores the colour channels at half resolution, because human eyes are much more sensitive to brightness than to colour.
  2. Splits the image into 8×8 pixel blocks and describes each block as a mix of smooth and detailed patterns (a discrete cosine transform).
  3. Rounds away the fine-detail patterns. The quality setting (usually 0–100) controls how aggressive that rounding is.

On a photo, this works remarkably well. Natural scenes are full of gentle gradients and random texture, and the detail JPG throws away is the kind our eyes skip anyway. A 12-megapixel phone photo that would need 36 MB as raw pixels typically fits in 1.5–4 MB as JPG.

The cost appears on sharp edges. Text, thin lines and flat areas of colour next to each other produce faint ripples (“ringing”) and blocky smudges around the edges. You have probably seen it on a screenshot of text that was saved as JPG: the letters look slightly dirty.

How PNG compression works

PNG (Portable Network Graphics, a W3C standard since 1996) is lossless. It stores every pixel exactly, then shrinks the data the way a ZIP file would: it predicts each pixel from its neighbours and compresses the prediction errors.

That approach is excellent when an image has large flat areas or repeating patterns, because predictions are almost always right. It is poor at photos, where every pixel differs slightly from its neighbours because of sensor noise and fine texture. PNG has to record all of that noise faithfully.

PNG also supports an alpha channel: each pixel can be fully opaque, fully transparent, or anything in between. JPG has no such channel; every JPG pixel is 100% opaque.

Side-by-side comparison

Feature JPG / JPEG PNG
Compression Lossy (discards detail) Lossless (keeps every pixel)
Transparency No Yes, full 8-bit alpha
Best for Photos, realistic images Logos, icons, screenshots, text, line art
Typical photo size (12 MP) 1.5–4 MB 9–17 MB
Re-saving after edits Loses a bit more quality each time No loss, ever
Colour depth 8 bits per channel 8 or 16 bits per channel, or a 256-colour palette
Animation No Only via the APNG extension
Metadata EXIF (camera, GPS, rotation) common Text chunks; EXIF rarely used
Support Universal Universal

File size, measured

Claims like “PNG is bigger” are only useful with numbers attached. We took a set of test images saved as JPG at typical quality settings (80–90) and converted them to PNG with our converter, once using the browser’s built-in PNG encoder and once with lossless PNG optimisation switched on.

Image JPG PNG (browser) PNG (optimised) Growth (optimised)
Phone photo, 12 MP 1.58 MB 15.68 MB 9.26 MB 5.9×
Photo, 1080p 337 KB 3.09 MB 2.06 MB 6.3×
Web photo, 1200×675 124 KB 1.26 MB 869 KB 7.0×
App screenshot, 1080p 114 KB 270 KB 142 KB 1.2×
Logo on white, 1000×1000 32 KB 198 KB 122 KB 3.8×

The converter applies “Compress PNG” automatically to images up to 6 megapixels to keep large photos fast. The optimised figures for the 12 MP and 4K photos come from running the same optimiser on them separately (9–15 seconds each); in the converter those two files use the browser encoder.

The pattern is clear. Photos grow six to seven times even with the best lossless compression. Screenshots barely grow at all once optimised, because flat interface colours are exactly what PNG is good at. If a screenshot was originally captured as PNG (most operating systems do this), it would also be free of the JPG artefacts our test JPG already contained.

There is a deeper explanation of these numbers, and of how to shrink PNGs, in Why is my PNG bigger than the JPG?

Quality: which one looks better?

At the moment you save them, a high-quality JPG and a PNG of the same photo look identical to almost everyone. The differences show up in three situations:

  1. Hard edges and text. PNG keeps them crisp; JPG adds ringing and smudges. This is visible even at high JPG quality.
  2. Repeated editing. Every time a JPG is opened, changed and saved again, it is compressed again and loses a little more. PNG can be re-saved forever without any change. Our generation-loss test measured this over ten saves.
  3. Heavy compression. At low quality settings (below about 60), JPG’s blocks and colour smearing become obvious even on photos.

What PNG cannot do is improve a photo that is already a JPG. Converting copies the JPG’s pixels, flaws included, into a lossless container.

Which format should I use? A decision table

You have… Use Why
A photo to post on social media JPG Platforms re-compress to JPG anyway; smaller upload
A photo to email or store JPG 6–10× smaller than PNG with no visible difference
A logo for a website or slides PNG Sharp edges, and a transparent background so it sits on any colour
A signature to insert into a document PNG Transparency lets it sit over lines and text naturally
A screenshot with text PNG Crisp text; often smaller than you would expect
An image you will edit many times PNG while editing, export JPG at the end No quality loss between edits
Product photos for an online shop JPG for full photos; PNG if you need a cut-out on transparent background Balance of size and flexibility
Images for print Whatever the print shop asks for; PNG or high-quality JPG both work Avoid low-quality JPG for print
Website images in general Consider WebP or AVIF Modern formats beat both on size; keep JPG/PNG as fallbacks

What about WebP and AVIF?

Modern formats such as WebP (2010) and AVIF (2019) can do everything JPG and PNG do, usually in smaller files: both support lossy and lossless compression and transparency. All current browsers display them. They are an excellent choice for images on your own website.

JPG and PNG remain the safest formats for everything else: email attachments, documents, older software, printers, upload forms and people who will open the file on devices you don’t control. That universal compatibility is the reason PNG is still the format people convert to when they need transparency.

Common myths

“PNG is higher quality than JPG.” Only in the sense that it never loses anything. A PNG made from a JPG has exactly the JPG’s quality.

“JPG and JPEG are different formats.” They are the same format; the three-letter extension comes from old Windows filename limits. See JPG vs JPEG.

“Converting to PNG removes JPG artefacts.” It freezes them in place. To actually reduce artefacts you need a denoising or AI upscaling tool, and even those only guess at the missing detail.

“Saving a JPG at 100 quality is lossless.” It is not. Quality 100 discards far less than quality 80, but colour subsampling and rounding still change pixel values.

Summary

JPG is the right format for photos where small files matter. PNG is the right format for graphics, text, anything that needs transparency, and any image you plan to keep editing. When you have a JPG and need one of PNG’s abilities, converting is quick and safe; just expect a larger file, and don’t expect lost detail to come back.

You can convert in your browser, without uploading anything, with our JPG to PNG converter, or remove a white background at the same time with JPG to transparent PNG.

More guides