Skip to content
universalImage Converter

Blog

How to Convert PNG to JPG with Minimal Visible Quality Loss

Converting PNG to JPG always discards some data, so no title can truthfully promise zero loss; what you can do is keep the loss below what anyone will notice. The steps are short, but the useful part is knowing which PNGs should not be converted at all.

By the Universal Image Converter Team

The steps

  1. Add your PNG files to the converter. Several at once is fine.
  2. Leave the output on JPEG.
  3. Set the quality. The slider covers 10 to 100, and its default of 90 suits most photographs. The quality article shows what happens at the extremes.
  4. If any of your PNGs have see-through areas, pick the background color those areas should become. JPG cannot be transparent; this article explains how to choose the color.
  5. Look at the size shown next to each result. If it is not smaller than the PNG, read the next section before you use the file.
  6. Download the JPG files.

Check what kind of picture the PNG is

PNG compresses without loss and works best on large flat areas and sharp edges, such as screenshots, charts and logos. JPG compresses by approximating small blocks of pixels, and works best on photographs and other smooth, noisy detail. Which side of that divide your picture falls on decides whether the conversion helps. I tested this with two synthetic 1920 x 1080 pictures, one a page of text on white with a blue rectangle (like a screenshot) and one a smooth gradient with heavy random noise (a harsh stand-in for a grainy photo), encoded with the Pillow library at several JPEG quality values. Real files vary, and a browser's encoder will not give identical byte counts, but the pattern is reliable.

EncodingScreenshot-likeNoisy gradient
PNG (lossless)213,652 bytes2,423,966 bytes
JPG quality 100538,199 bytes1,923,788 bytes
JPG quality 90295,077 bytes876,842 bytes
JPG quality 80230,456 bytes609,634 bytes
JPG quality 70198,355 bytes455,059 bytes

On the noisy picture, JPG at 90 is a little over a third of the PNG's size. On the screenshot, JPG at 90 is nearly 40 percent larger than the PNG, and it needed quality 70 to come in below it. If your PNG is a screenshot, diagram or logo, converting to JPG usually makes it bigger and worse.

What the loss looks like and where it shows

Besides file size, I measured how far the JPG pixels strayed from the original. On the noisy gradient at quality 90, the largest difference in any color channel was 21 steps out of 255, and the average error corresponded to a peak signal-to-noise ratio of 36.4 dB; at quality 100 the largest difference was 1. On the screenshot at quality 90, the largest difference was 71, concentrated on the letters and the rectangle's edge, where a sharp line meets a flat color.

That second number explains the familiar look of badly converted screenshots: a faint fringe of off-colored dots around text, sometimes called ringing or mosquito noise. It is much less noticeable on most photos, where detail is busy and edges are soft, and obvious on a screenshot of a spreadsheet. Numbers like 71 out of 255 sound alarming, but they occur on only a thin band of pixels, which is why the picture still reads fine at normal zoom and fails when you enlarge it.

This is the whole meaning of "without visible quality loss": the loss is real, measurable, and hidden in detail the eye does not resolve at the size you view it. Whether that is acceptable depends on the picture, not on the slider alone.

Decision rules for choosing the settings

Mixed batches and how to check the result

Every setting in the converter applies to all files in the list, so a batch that mixes screenshots and photographs forces one compromise on both. Split the work in two runs: photographs at 85 to 90, screenshots either kept as PNG or converted at 95 or higher. It takes a minute and avoids ruining the screenshots to save bytes on the photos.

To inspect a result, open the JPG at 100 percent zoom and look at three places: the edge of text or a logo, the transition between two flat colors, and any smooth gradient such as a sky. Fringes around text point to a quality value that is too low for that picture. Visible bands in a gradient are a separate issue. They come from storing the picture in 8 bits per channel and a block structure of 8 x 8 pixels, and they are more likely at low quality. If you spot either, raise the quality by 5 or 10 points, convert again, and compare the new size. The converter re-runs the whole list whenever a setting changes, so trying two values costs seconds.

A worked size budget

Suppose a job application portal accepts photos up to 2 MB and your PNG export is 4000 x 3000 pixels, which is 12 megapixels. At 3 bytes per pixel, the uncompressed data would be 12,000,000 x 3 = 36,000,000 bytes, about 36 MB. Even after PNG's lossless compression, a photograph of that size is usually many megabytes, and a JPG at quality 90 of it can still be well over 2 MB. Choose a maximum size of 2560 pixels on the longest side: the picture becomes 2560 x 1920, about 4.9 megapixels, 41 percent of the original pixel count, and a quality of 85 to 90 will normally bring it under the limit with room to spare. If it still does not fit, drop to 1920 pixels before you drop quality below 80.

Each result lists its byte size next to the original, so you can test against the limit directly instead of guessing. Typical numbers vary by picture; a photo of foliage is much larger than a photo of a blue wall, even at identical dimensions.

Mistakes that cost quality without saving space

Converting a JPG to PNG and back to JPG does not recover anything; it adds a second lossy pass. Re-saving the same JPG at 90 repeatedly gradually erodes edges, a topic covered in common conversion mistakes. Raising the slider to 100 does not make the JPG identical to the PNG: in my test the screenshot at quality 100 still differed by up to 72 steps in one channel and was 2.5 times the PNG's size. Past about 95, you pay a lot of bytes for a difference you cannot see.

Finally, many JPG encoders store color at lower resolution than brightness (chroma subsampling). Saturated red text on a blue background is the classic casualty. If you must use JPG for such a picture, test at 100 percent zoom before sending.

Add your PNG files, check the before and after sizes, and download JPGs only where the file actually got smaller.

Open the image converter