Open Tools Tools Features Blog About Contact Proof of Privacy

Converting PNG to JPG

PNG is lossless and JPG is not. What that actually costs, what happens to transparency, and the measured size and speed of doing it in your browser.

HomeImage converter › Converting PNG to JPG

Where PNG came from, and why it is like this

PNG was designed in 1995 by a group that wanted a patent-free replacement for GIF, and its priority was exactness. Every pixel you put in comes back out identical, because PNG compresses the way a ZIP file does — it finds repetition and encodes it compactly, but never throws anything away. That makes it perfect for screenshots, diagrams, logos and anything with hard edges or flat colour, and badly suited to photographs, where no two adjacent pixels are ever quite the same and there is almost no repetition to find.

JPEG came out of a committee three years earlier with the opposite priority. It assumes the thing being stored is a photograph and that a human will look at it, and it discards the detail human vision is worst at noticing — fine colour variation, especially. A photograph saved as PNG and the same photograph saved as JPEG can differ by a factor of ten in size, and most people cannot tell them apart on screen.

Is this conversion lossy?

This conversion is lossy in one direction only, and it is this one. Once the JPEG is written, the discarded detail is gone; converting the result back to PNG produces a large file that faithfully preserves the JPEG's compression artefacts.

What degrades is specific and predictable. JPEG works on 8×8 blocks of pixels, so the damage appears at block boundaries: soft haloes around sharp edges, and a faint checkerboard in areas of flat colour. This is why converting a screenshot of text to JPEG looks visibly worse while converting a photograph of a landscape often looks identical. Text is nothing but sharp edges; landscapes are mostly gradients.

If your PNG is a screenshot, a chart, a logo, or a scan of a document, expect to see the artefacts. If it is a photograph, expect not to.

What happens to metadata, transparency and colour

Transparency does not survive. This is the failure people actually hit. PNG has an alpha channel; JPEG has none and cannot be given one. Anything transparent has to become some colour, and in a browser canvas conversion that colour is whatever the canvas was initialised to — which is why a logo with a transparent background so often comes out of a converter with a black box around it rather than a white one. If your PNG has transparency you care about, this conversion is the wrong one.

Metadata does not survive either. The conversion runs through a canvas, and a canvas holds pixels and nothing else. Any PNG text chunks, creation software tags or embedded colour profile are dropped. For a screenshot that is usually a feature. For anything colour-critical it is not: without an embedded profile, a wide-gamut image will be interpreted as sRGB and can come out visibly duller.

PNG has no animation to lose — that is APNG, a separate extension, and it is not what a converter will read.

Why people actually need this

The common situation is a size limit. Screenshot tools and phones produce PNGs by default, an upload form caps attachments at a few megabytes, and a PNG screenshot of a full desktop can easily exceed that while the same image as JPEG is a tenth of the size. The second common situation is an upload form that lists accepted formats and PNG is not among them — still surprisingly frequent on government and banking portals, which tend to accept JPEG and PDF and nothing else.

There is a third, less obvious one: email. Several corporate mail filters treat PNG attachments with more suspicion than JPEG, because PNG's chunk structure has historically been used to smuggle data. Converting is sometimes the fastest way past a filter you cannot argue with.

What we measured

This conversion was run end to end before this page was written. Not "should work" — run, with the output checked:

Verification runResult
Source file usedimg-size-5mb.png (5.0 MB)
Output produced1.5 MB
Output type reported by the browserimage/jpeg
Time to produce it315 ms

And the ceilings measured for Image converter, the tool that performs it, on the hardware described on the limits page:

Not tested

The page also refuses files above 50 MB before it starts, which is a guard written into the tool rather than something the browser imposes. Why those are different.

When something else is the better answer

If the image is a screenshot, a diagram or anything with text in it, converting to JPEG to save space is usually the wrong trade — you will see the artefacts and the saving is smaller than it is for photographs, because JPEG is bad at exactly the content PNG is good at. Compressing the PNG keeps it lossless and often gets most of the way there.

If the goal is a smaller file for a website rather than for an upload form, converting to WebP beats JPEG on size at the same visual quality and, unlike JPEG, keeps transparency. Every browser tested for this site's compatibility matrix can display it.

If the image needs to go into a document rather than a form, putting it straight into a PDF skips the question entirely.

Do it now: Image converter runs entirely in your browser — nothing is uploaded.

Related: Converting PNG to WebP · Converting JPG to PNG