You convert a PNG to JPG and the transparent background turns white, sometimes with a white fringe around the edges. You convert a JPG to PNG and the quality does not improve at all while the file grows several times over. Many people assume the tool is buggy, but both outcomes follow from how the formats are designed: PNG is lossless and has a transparency channel, while JPG is lossy and has none.
This guide takes the conversion apart: what is lost and what is added in each direction; pixel arithmetic that explains white fringes and file size; how to choose the quality slider; and a troubleshooting table and format guide. Conversion runs locally in the browser and the image is not uploaded.
1. The essential difference between the formats
| Item | PNG | JPG |
|---|---|---|
| Compression | Lossless: every decoded pixel equals the original | Lossy: discards information the eye is less sensitive to, in exchange for smaller files |
| Transparency | Supported; each pixel has an opacity from 0 to 255 | Not supported; every pixel must be an opaque color |
| Good at | Screenshots, interfaces, text, line art, icons, logos | Photographs, gradients, colorful natural scenes |
| Poor at | Photographs (very large files) | Text and sharp lines (stray color and blocky artifacts at edges) |
| Compatibility | All modern browsers and software | The safest; accepted by almost every system, print workflow and ID upload form |
To see why file sizes differ so much, do the arithmetic. A 1920×1080 image at 8-bit RGBA is 1920 × 1080 × 4 = 8,294,400 bytes uncompressed, about 7.9 MiB; as opaque RGB it is 6,220,800 bytes, about 5.9 MiB. PNG and JPG both compress that raw data. In a photograph neighboring pixels almost never match, so lossless compression has little to work with and a PNG photo is large and slow; a screenshot has big areas of flat color that PNG compresses very small, while JPG leaves stray color around the text.
2. PNG to JPG: four things happen
1. Transparency is filled with white
JPG has no alpha channel, so the image must first be composited onto an opaque background. ToolGarden’s JPG conversion always uses white (#ffffff), and the page states that transparent areas are filled with white. If you want black or some specific color, lay that backdrop down in an image editor before converting.
2. Semi-transparent edges turn into a white fringe
An anti-aliased logo or an icon with a shadow has semi-transparent edge pixels. Compositing onto white follows: result = α × foreground + (1 − α) × background. Take a black edge pixel as an example:
| Edge pixel opacity α | Gray value after compositing on white | Appearance |
|---|---|---|
| 100% | 0 (pure black) | The subject |
| 50% | about 128 | Mid gray |
| 25% | about 191 | Light gray |
| 0% | 255 (pure white) | Blends into the background |
The trouble comes when you later place the JPG on a dark background: that ring of light gray at the edge becomes a visible white fringe. If the image will end up on a dark background, either keep it as PNG, or composite it onto the target background color first and then convert to JPG.
3. Lossy re-encoding
JPG cuts the image into 8×8 blocks, applies a frequency transform to each, and discards high-frequency detail according to the quality setting. The lower the quality, the more is discarded, and text edges and thin lines show stray color and blocks first. The tool’s quality slider runs from 10% to 100%, with 92% as the JPG default. The percentage is not “92% of the quality is kept”; it is a control parameter of the encoder, and the same number in different software is not equivalent.
4. Metadata and animation are dropped
The conversion decodes in the browser and re-encodes through a Canvas, so the original EXIF data (device, time, location) is not written to the new file. That is good for privacy, but if you need it, back it up separately. Only the first frame of a GIF or animation is taken. An embedded color profile generally does not carry over either, so a wide-gamut image may look less saturated afterwards.
3. JPG to PNG: it cannot get better, only bigger
Converting to PNG is lossless: pixel values are identical to what went in. But “lossless” is relative to the input. Detail that JPG already discarded does not return because the container changed, and the 8×8 block artifacts are preserved perfectly inside the PNG. The result is a much larger file and no improvement in quality.
So when is JPG to PNG still worth doing? Mainly in three cases: you will keep editing and do not want each save to add loss, you need to apply a transparency mask or cutout before saving, or the destination accepts only PNG. Otherwise do not do it “to improve quality”.
4. Procedure and practical tips
- Open Image to JPG or Image to PNG. Click to choose files, drag them in, or paste an image from the clipboard. PNG, JPG, WebP, GIF, BMP, SVG and AVIF are accepted, up to 50 MB and 40 million pixels per file.
- Conversion starts automatically after you choose files, and you can drop in several at once.
- For JPG, adjust with the quality slider (10% to 100%) and press Convert again. PNG has no quality option because it is lossless.
- Click a thumbnail to open the preview and flip between source and output (the left and right arrow keys work). Check text edges and gradients at 100% or higher zoom.
- Download one by one, or press Download ZIP to take everything at once. The result panel shows output dimensions, size and time taken.
Example: finding the right JPG quality for one image
Do not pick a number by feel. A more reliable method is to generate at the default 92% as a baseline, then try 85%, 75% and 65%, each time checking at 200% zoom for stray specks around text edges and beside flat color areas, and for banding in large gradients such as sky or walls. Choose the step just before visible artifacts begin. The table below gives rule-of-thumb starting points, not standards.
| Purpose | Starting quality | Reason |
|---|---|---|
| Further editing, archiving | 90% or higher | Lose as little as possible; it will be re-encoded again |
| Large web images, portfolio display | 80% to 90% | In this range most photos are hard to tell apart by eye |
| Thumbnails, small list images | 70% to 80% | Displayed small, so detail loss is hardly visible |
| Images with text or lines | Prefer PNG | JPG fails first at text edges |
What conversion does not change
Format conversion changes only the encoding, not the pixel dimensions: a 1920×1080 PNG comes out as a 1920×1080 JPG, which is neither sharper nor smaller in size. Use the resize tool to change dimensions, or the compressor to shrink the file while keeping the format. Also, the DPI value stored in a file is only a hint for print software and is not the real resolution: a 600×400 pixel image holds the same amount of detail whether it is labeled 72 or 300 DPI. For photo printing, check whether the pixel dimensions are large enough, not the DPI number.
Why round trips get worse every time
After PNG to JPG to PNG the file is a PNG again, but the loss from the JPG step is permanently baked into the pixels, and the file is much larger than the JPG alone. Opening and re-saving a JPG repeatedly stacks loss each time (generation loss). The right habit is to keep one original lossless image and export every format you need from it.
5. Choosing a format
| Your image | Recommended format | Notes |
|---|---|---|
| Photo for the web or social platforms | JPG, or the smaller WebP | JPG is a good size for photos |
| Screenshots, interfaces, text | PNG | Lossless, with clean text edges |
| Logos, icons, assets needing transparency | PNG or WebP | Keeps the alpha channel; JPG cannot |
| ID photo uploads, legacy systems, email attachments, print shops | JPG | The best compatibility; accepted almost everywhere |
| Working files edited several times | PNG | Avoids stacking loss on every save |
6. Common problems and how to check them
| Symptom | Cause | Fix |
|---|---|---|
| Transparent background becomes white after converting to JPG | JPG has no alpha channel and the tool fills with white | Keep PNG or use WebP for transparency; lay a different backdrop in an editor first if needed |
| A white fringe appears around an icon on a dark background | Semi-transparent edges were composited onto white before saving as JPG | Keep PNG, or composite onto the target background color first |
| The file got bigger after converting to JPG | The source was a well-compressed WebP or AVIF, which JPG cannot match | Choose JPG for compatibility, not size |
| File size explodes after JPG to PNG | PNG is lossless and photos have little redundancy to remove | Expected; do not convert if you do not need PNG |
| Colors look less saturated than before | The embedded color profile is not kept; wide-gamut images show it most | Keep the original for color-critical print or design work |
| Stray color and blocks around text | JPG quality too low, or text-heavy content does not suit JPG | Raise quality; use PNG for text-heavy images |
| An animation became a single still | Only the first frame of a GIF or animation is taken | Keep the original format, or use a GIF tool to split frames |
| Capture time and location are gone | Re-encoding does not write EXIF | Record it with the EXIF viewer first and keep the original file |
7. When not to use this approach
- Photographic originals whose capture metadata matters: conversion drops EXIF, so keep the original file.
- Hoping JPG to PNG will improve quality: it cannot; detail already lost does not come back.
- Anything animated: only the first frame is kept.
- Print work needing strict color management (CMYK, professional ICC profiles): a browser Canvas conversion is not suitable.
- Just wanting a smaller file without changing format: use the image compressor, which can keep the original format.