JPG vs PNG: when to use each
The rule of thumb is simple once you know why it works: JPG for photos, PNG for anything that needs sharp edges, flat color, or transparency.
The rule of thumb, and why it holds up
JPG is built to compress photographs: continuous tones, gradients, and natural detail. PNG is built to reproduce pixels exactly: text, logos, line art, and anything with hard edges or transparency. The rule of thumb, "photos as JPG, graphics as PNG", exists because each format's compression method is tuned for one of those two kinds of image, and using it on the other kind of image gives worse results than either the file size or the visual quality suggests it should.
How JPG gets small
JPG, standardized in 1992, compresses by discarding information the human eye is less sensitive to. It splits an image into 8 by 8 pixel blocks, converts each block into frequency data with a discrete cosine transform, and then quantizes that data, keeping the frequencies that matter most for perceived sharpness and discarding more of the ones that do not. It also applies chroma subsampling, storing color detail at a lower resolution than brightness detail, because human vision is far more sensitive to brightness than to color. The result is dramatic compression on photographic content with only a small, usually invisible, quality cost.
That same block-based, frequency-domain approach is why JPG looks bad on flat graphics and text: the blocky artifacts and ringing it introduces around hard edges are exactly the kind of detail a photo does not have but a logo or a screenshot does.
How PNG stays exact
PNG never discards data. It compresses losslessly with DEFLATE, so decoding a PNG always returns the exact original pixels, no artifacts, no blur, and no generational loss even if you resave it many times. That precision comes at a cost: PNG compresses smooth photographic gradients far less efficiently than JPG does, so a photo saved as PNG is typically much larger than the same photo saved as JPG at a normal quality setting.
The transparency difference
JPG has no alpha channel at all: it cannot represent transparency, full stop. If you convert a transparent PNG to JPG, the transparent areas get filled with a solid background color. PNG supports a full alpha channel, which is why it remains the default for logos, icons and any graphic that needs to sit cleanly over different backgrounds.
Generational loss: why repeated JPG saves get worse
Because JPG's compression is lossy, re-encoding a JPG (opening it, editing it, and saving it as JPG again) discards a little more information each time, a phenomenon known as generational loss. PNG has no such problem: re-saving a PNG any number of times returns the same pixels every time. If a file goes through multiple rounds of editing, keep it in a lossless format like PNG until the final export, then convert to JPG once at the end.
Try it now
Ready to convert? These converters run entirely in your browser, free and with no upload:
Related tools
Frequently asked questions
Which format should I use for a screenshot?
PNG. Screenshots have sharp text and flat UI colors, which PNG reproduces exactly and JPG tends to blur and blotch with compression artifacts.
Why is my PNG file so much bigger than the same image as JPG?
PNG never discards data, so it cannot compress smooth photographic gradients as aggressively as JPG's lossy, perception-based compression can. That is expected, not a bug.
Can I convert a JPG back to a lossless PNG to stop further quality loss?
You can convert it, and the PNG will decode to whatever pixels the JPG already had, but converting cannot restore detail the JPG already discarded. It does stop any further generational loss from additional resaves.