Skip to main content

JPG vs PNG

JPG and PNG are both in wide use and are chosen for different reasons. This page sets them against each other on the things that decide between them, and links to the converters for both directions — every one of which runs in your browser, with the file never uploaded.

The short answer

This is the oldest question in image formats and it has a clean answer: JPG for photographs, PNG for everything else. JPG throws away detail the eye is poor at noticing, which works beautifully on a photograph and badly on a screenshot, where the discarded detail is the crisp edge of a letter. PNG throws away nothing, which is ideal for a screenshot and ruinous for a photograph, where the file balloons for no visible gain.

The second difference decides the cases the first does not. PNG has a full alpha channel and JPG has no transparency at all — not a limited kind, none. A logo with a transparent background saved as JPG comes back with a solid rectangle behind it, and there is no setting that prevents it.

Where people go wrong is with images that are a bit of both — a screenshot with a photograph in it, a product shot on a white background with text over it. There is no correct answer for those, only a trade: JPG and accept soft edges around the text, or PNG and accept a file several times larger. If the text is the point, choose PNG.

Side by side

JPG and PNG compared on the properties that separate them.
PropertyJPGPNG
CompressionLossyLossless
Colour8 bits per channel8 bits per channel
TransparencyNoneFull alpha channel
AnimationNoNo
Keeps EXIFYesYes
Browser supportEvery browser since 1995Every browser since 1997
Size of a photographThe baseline this row compares against3 to 5 times a JPG
Published19921996

Where they actually differ

  • They compress differently, and that is the difference behind most of the others: one keeps every pixel exactly as it was given, the other discards detail to be smaller and cannot put it back.
  • They do not agree about transparency. Converting an image with a transparent background from one to the other either preserves it or fills it with a solid colour, and which of those happens is decided by the format, not by the file.
  • For the same photograph at comparable visible quality, JPG produces the smaller file — usually by enough to matter on a page carrying several images.
  • They are 4 years apart, and most of what separates them is what had been learned in between.

What people get wrong

  • Converting from the lossy one to the lossless one does not repair anything. The detail its encoder discarded is not in the file, so what you get is a larger file holding exactly the same damaged image.
  • Converting between two lossy formats re-encodes an already-compressed recording, so the result is slightly worse than the input whatever quality you pick. Work from the least-processed copy you have.
  • Converting into the format without transparency fills every transparent pixel with a solid colour, and the result looks fine on a white page and wrong on any other. Decide the background deliberately rather than letting a default decide it.
  • Expect the file to change size substantially in one direction. That is the formats behaving as designed rather than a failed conversion, and it catches people who assume a conversion is roughly size-neutral.

Which to choose

Choose JPG when
Choose JPG for photographs and for anything that behaves like one, and whenever the file has to open on absolutely any device.
Choose PNG when
Choose PNG for screenshots, logos, icons, diagrams, anything containing text, and anything that needs a transparent background.

Converting between them

Common questions

Does converting a JPG to PNG improve it?
No. PNG stores exactly what it is given, and what it is given is an image that has already lost detail. You get a much larger file holding the same picture. The conversion is worth doing only when you need transparency, or when you are about to edit and want to stop losing more with each save.
Which of JPG and PNG is better?
Neither, in general — if one were simply better the other would have disappeared. They are good at different things, and the short answer above says which is which. The useful question is what the file has to do next: be edited, be published, be opened by somebody else, or fit inside a size limit.
Does converting between them lose anything?
It depends on the direction. Converting into a format that stores everything loses nothing but does not recover anything either; converting into one that discards detail loses a little each time. The table above says which of these two does which.
Can I convert back afterwards?
The file will convert back, but whether it comes back unchanged depends on the direction. Between two formats that store everything, a round trip is lossless. Where one of them discards detail, that detail is gone and the return journey cannot invent it.
Can I use both?
On a web page, often yes, and it is usually the right answer: serve the smaller modern format and list an older one as a fallback so each browser takes what it understands. For a file you are handing to a person, pick one — the one they can open.
Which one does my software support?
The side-by-side table above says which browsers read each, which is the part that varies most. Desktop support is harder to state in general and tends to lag browsers by years, so if the file is going to somebody else, the older and more widely read of the two is the safer choice.
Is converting between them free?
Yes, with no account and no limit on how many files you convert. Every converter linked from this page runs in your browser: the file is read from your device, converted by code running on it, and handed back as a download.
Is my file uploaded?
No. There is no conversion server here to upload it to, and no third-party service is involved. You can confirm it yourself: open your browser's developer tools, switch to the Network panel with no filter, and run a conversion — no request carries your file.

Ads on this site

Advertising pays for this site. The ads may store cookies to choose what to show you and to avoid repeating themselves. Your files are not involved in any of it — they never leave your browser, whichever button you press, and every tool works either way.

What this covers