Searching...
No tools found

JPG to PNG: Why the PNG Is 6x Bigger, and How to Fix It

Image··8 min read

Every converter writes the same truecolour PNG, so a 33 KB JPG comes back as 99 KB and a photo comes back six times its size. Here are the measured numbers, what the pages that rank do about it, and the indexed PNG that beat the JPG it came from.

Converting a JPG to PNG is the simplest operation in image processing: decode the picture, write the pixels out again in a different container. The trouble is that nobody warns you what the second container costs. I ran the JPG to PNG converter on this site over three real files and read the output bytes back, and the pattern is consistent: a 32,994-byte artwork JPG became a 99,125-byte PNG, and a 32,761-byte photograph became 198 KB. Three times the file, and six times the file.

Then one result went the other way, which is the reason this post exists. The same 32,994-byte artwork, written as an indexed PNG instead of a truecolour one, came out at 21,689 bytes — smaller than the JPG it started as, and 4.6 times smaller than the PNG the plain conversion produced. Same pixels, same dimensions, no visible difference. That option is what almost every converter on the web does not offer, and it is what turns this from a format formality into something you can actually use.

What actually happens to the bytes

JPEG is lossy on purpose. It throws away detail your eye will not miss, and that is why a photograph fits in a few hundred kilobytes. PNG is lossless: it stores every pixel in full, three bytes each, and compresses them without discarding anything. So when you convert, you are not recovering what JPEG discarded — you are being asked to pay to store it again, at full price.

On a photograph the bill is large. The 400 × 300 test photo, 32,761 bytes as a JPG, became a 198 KB PNG. It is the same picture. Nothing was gained except the container, and if the reason you converted was a form that accepts PNG, the form now has a file six times bigger than the one you started with.

There is a detail here that only shows up when you read the file. Chrome writes its PNG as colour type 6 — truecolour with an alpha channel — even though a JPEG has no transparency at all. ImageMagick reports the output as TrueColorAlpha. A quarter of the uncompressed buffer is a constant 255 that carries no information whatsoever. It compresses away, so the file is not a third larger because of it, but it is the kind of thing you only learn by looking at the bytes instead of the picture.

What the pages that rank do about it

They mostly do not mention it, and the ones that do treat it as physics. The client-side converter at jpgtopngonline.com is honest about processing — "100% client-side processing - your files are processed entirely in your browser" — and then answers the size question in its own FAQ like this:

"Why are PNG files usually larger than JPG files? PNG uses lossless compression, which preserves all image data. As a result, PNG files are typically larger than JPG files... The larger file size is the trade-off for better quality preservation."

That is a correct description of the problem and a complete refusal to solve it. Its batch limit is thirty images.

FreeConvert goes the other way and uploads. Its own page says "we upload your files over a secure HTTPS connection and delete them automatically after 8 hours", next to "Max file size 1GB. Upgrade for more" and "Want to convert large files without a queue or Ads? Upgrade Now". Zamzar opens with "Max. file size 2MB ( want more? )" — a 2 MB ceiling on the input, which is precisely the ceiling that makes a six-times-larger output unusable. DigitalOfficePro states it plainly under the drop zone: "Your file will be uploaded to DigitalOfficePro storage."

None of them offers a smaller PNG. That is the gap: the size problem is universal, acknowledged, and then left with the user.

The other kind of PNG

PNG has two ways to store colour, and the converters all use one. A truecolour PNG stores three bytes per pixel. An indexed PNG stores a palette of at most 256 colours plus one byte per pixel pointing into it — the same trick GIF uses, in a format that is not GIF.

For a photograph a 256-entry palette is hopeless: millions of tones have to be approximated by 256, and the approximation shows as banding. For flat artwork it is close to free. A chart, a screenshot, a slide, a logo or a line drawing has only a few hundred distinct colours to begin with, so the palette has almost nothing to approximate.

The numbers from the real page, with the output re-read from disk:

FileJPGTruecolour PNG256-colour PNG
Artwork, 800 × 60032,994 B99,125 B21,689 B
Artwork, 1600 × 120043,950 B132 KB23 KB
Photograph, 400 × 30032,761 B198 KB51 KB (rejected)

The 800 × 600 case is the one worth staring at. The palette PNG is 21,689 bytes against a 32,994-byte JPG — the conversion made the file smaller, which is the opposite of what every page above says will happen.

How do you know it still looks right?

You measure it, on the actual file, rather than trusting the file type. The tool encodes both versions, decodes the palette one back, and compares the two pixel by pixel using structural similarity — the same measure the rest of this site uses for compression, where 0.985 is the documented bar for "not perceptible".

Measured on the artwork: SSIM 1.0000, with no colour channel moved by more than 8 levels out of 255. Measured on the photograph: SSIM 0.9432, well under the bar, so the 51 KB palette file was thrown away and you get the 198 KB truecolour one instead. The row on the page states which happened and the score that decided it, so the choice is visible rather than buried.

That is the honest shape of the feature. It is not "always smaller". It is "smaller when the picture can afford it, and a number when it cannot".

The check I got wrong first

The first version of this engine also refused the palette whenever any single colour channel had moved by more than 12 of 255 levels. It sounded like a sensible second safety net. It was wrong, and a large file proved it.

The 1600 × 1200 artwork scored SSIM 1.0000 and had 0.0% of its channels move by more than 8 levels. One outlier pixel sat at 15. That one pixel rejected a 23 KB file in favour of a 132 KB one — a 5.7-fold loss, decided by a single pixel out of 1,920,000.

A peak over two million pixels is an extreme-value statistic: it grows with image size and it is decided by the worst pixel in the picture. It was measuring the image size, not the quality. SSIM separated the same two cases cleanly — 1.0000 for the artwork, 0.9432 for the photograph — so SSIM decides, and the share of channels that moved is reported next to it as the plain-language number, because a rounded 1.0000 on its own would overstate an exact match.

None of that was visible from reading the code. It took a file big enough to have an outlier.

What it will not do

It will not add transparency. A JPEG has no alpha channel, so there is none to carry across. If you need a transparent PNG, the source has to already be one.

It will not restore detail. The pixels in the PNG are the pixels the browser decoded from your JPEG, and the JPEG already discarded what it discarded. Converting twice does not add anything back.

Above 2.0 megapixels it skips the palette entirely. Building a palette means scanning every pixel before the file can be written. The 1.92-megapixel artwork took 669 ms from dropping the file to a finished row, which is about as long as a click can take before it feels broken; a 12-megapixel phone photo would take several times that. So over the ceiling the lossless PNG is written directly and the row says the check was skipped. For a 12 MP photograph that costs you nothing, because the palette would have been rejected anyway. For a 12 MP screenshot it is a real loss, and it is the obvious next thing to fix.

It will not keep your metadata. Re-encoding through a canvas drops EXIF, including the camera data and any GPS coordinates in it. For most conversions that is a feature. If you need the metadata removed deliberately and verifiably, that is a separate job.

Which of your files are which

The decision is about content, not file size:

  • Palette wins: screenshots, charts, diagrams, slides, logos, scanned line art, text on a solid background, anything exported from a design tool as flat colour.
  • Palette loses: photographs, anything with a sky, skin, foliage or a smooth gradient, anything already saved at low JPEG quality so the whole frame is full of compression noise.
  • Do not care: if the file is going into an archive or a print pipeline that will accept it, leave the setting on Auto and take whichever the measurement picks.

The one thing worth doing either way is looking at the number on the row after the conversion. A PNG that came back at six times the size of the JPG is not a failure of the tool — it is the format being honest about what a lossless copy costs — but it is the moment to ask whether the thing you are uploading will accept it.

Frequently asked questions

Why did my PNG come out six times bigger than the JPG?

Because PNG is lossless and JPEG is not. A JPEG has already discarded detail, and a PNG has to store every pixel in full, three bytes each. Measured on this site with a real file: a 32,761-byte photograph became a 198 KB PNG. On flat artwork the same conversion is far cheaper — a 32,994-byte artwork became a 99,125-byte PNG, about three times — and with a 256-colour palette it came out at 21,689 bytes, smaller than the JPG it started as.

Is the 256-colour PNG still lossless?

No, and the tool says so. It stores a palette of at most 256 colours and one byte per pixel, so colours outside the palette get approximated. On flat artwork the approximation is invisible: measured SSIM 1.0000 with no channel moved more than 8 levels out of 255. On a photograph it is obvious: the same test scored 0.9432 and the palette file was rejected in favour of the truecolour one.

How does the tool decide which PNG to give me?

It encodes both, decodes the palette copy back, and compares the two pixel by pixel. The palette file is used only when it is smaller and structural similarity stayed at or above 0.985. Otherwise you get the truecolour PNG and the row prints the score that rejected the palette. The check runs per file, on the actual output, not from the file type.

Why is the 256-colour option skipped on my photo?

Above 2.0 megapixels the tool writes the lossless PNG directly and says so. Building a palette means scanning every pixel first, and the measured time at 1.92 megapixels is 669 ms from dropping the file to a finished row. A 12-megapixel photo would take several times longer, so the ceiling trades an unlikely win on big photographs for a tool that never appears to freeze.

Does converting JPG to PNG improve the image?

No. The conversion cannot recover what JPEG discarded, so the PNG looks the same as the JPG and is larger. What you gain is a container that upload forms, print pipelines and older software accept, and a file you can edit and re-save repeatedly without adding another generation of compression artefacts each time.

Does the PNG have transparency?

No. A JPEG has no alpha channel, so there is nothing to carry across and the PNG comes out fully opaque. Chrome does write the file as truecolour-with-alpha — ImageMagick reports TrueColorAlpha — but that alpha is a constant 255 on every pixel. If you need a transparent PNG, the source has to already be one.

Is my file uploaded to a server?

No. The decode, the palette, the comparison and the encode all run in the browser tab. You can disconnect from the internet after the page loads and the tool still works, because nothing is sent anywhere. The pages ranking for this query mostly do upload: FreeConvert states it uploads your file and deletes it after 8 hours, and DigitalOfficePro says under its drop zone that your file will be uploaded to its storage.

Why does my PNG have no EXIF data?

Because re-encoding through a canvas writes new pixels and drops the original metadata, including camera settings and GPS coordinates. For most conversions that is desirable — a photo going onto a form should not carry the coordinates of where it was taken. If you need to strip metadata while keeping the file otherwise untouched, use a dedicated metadata tool rather than a format conversion.

Written by the Chaudify team. Every tool mentioned here runs entirely in your browser — nothing you open is ever uploaded. Browse all tools or read more guides.