PNG to JPG Converter — For Photos Stuck in PNG Files
5–10× smaller files. Transparency flattens to white. Halo artifacts explained.
A surprising amount of PNG content is photographs that should never have been PNG in the first place — macOS screenshots saved as Cmd+Shift+4 captures, design tool exports with default settings, file-attachment tools that pick PNG by default. For these, JPG is the right delivery format: 5–10× smaller files at visually identical quality. The catch is transparency. PNG has it; JPG does not. Drop PNGs below, set a quality (85% works for most photos), and download JPG. The transparency-flattening section below explains the most common surprise: a white halo around anti-aliased edges.
Real-World Benchmark — Our Own Tests
Below are file sizes (rounded to the nearest readable KB; byte-exact values in src/assets/benchmarks/png-to-jpg/results.json) from running this exact converter (tooldev.app v1.5) on five representative PNG inputs. No theoretical estimates — these numbers reflect the actual Canvas-API output you will see when you upload the same files.
| Sample | Source PNG | JPG @ 50% | JPG @ 75% | JPG @ 100% |
|---|---|---|---|---|
| icon (256×256, transparent) | 1.8 KB | 5.7 KB | 7.8 KB | 35 KB |
| photo (1920×1280) | 373 KB | 57 KB | 95 KB | 560 KB |
| screenshot (1440×900) | 41 KB | 32 KB | 42 KB | 113 KB |
| gradient (1280×720) | 121 KB | 8.4 KB | 13 KB | 234 KB |
| composite (1280×853) | 49 KB | 20 KB | 27 KB | 240 KB |
Methodology & honest caveats
Test images are all self-generated by tooldev.app (see src/assets/benchmarks/samples/SOURCES.md). Conversions executed via tooldev.app v1.5 on 2026-05-20 in Chromium 148 on macOS. Output quality slider tested at 50%, 75%, and 100%. Reported file sizes are rounded to the nearest KB from the actual Canvas-API toBlob output. Transparency is flattened to white. JPEG does not support alpha. Our converter pre-fills the canvas with white before drawing the PNG on top, so fully transparent pixels become solid white and semi-transparent pixels are blended against white (which can leave pale halos around anti-aliased edges). The icon sample row shows the size effect clearly: a 1.8 KB transparent icon becomes a 5.7 KB JPG at q=50 because the previously-empty surrounding region is now a solid white block that JPEG has to encode. For logos, icons, or graphics with hard edges, prefer PNG or WebP. Honest caveat about JPG at 100%: the maximum quality setting disables most quantization, which inflates file size dramatically for non-photographic content (the gradient row goes from 121 KB PNG to 234 KB JPG). JPG at 75% is the practical sweet spot for typical photographs. Sample files: icon.png, photo.png, screenshot.png, gradient.png, composite.png — all in our repository under src/assets/benchmarks/samples/.
Your Files Never Leave Your Browser
Conversions run locally in your browser using the Canvas API, with Web Workers used when supported. Your image data stays on your device and is never uploaded to any server.
We use Google Analytics and Google AdSense for aggregated traffic stats and contextual ads when consent allows it. Theme and language preferences stay in your browser. We never see, read, or store the images you convert.
Browser-based conversion has trade-offs: large files (>50 MB) may hit memory limits; animated GIF output flattens to a single frame; EXIF metadata is stripped; ICC color profiles may differ across browsers.
> transparency_and_chroma_caveats
JPG was designed in 1992 for photographs. It has no concept of transparency, no alpha channel, and uses chroma subsampling that works well for natural scenes but poorly for sharp graphics. When you convert a PNG to JPG, both differences come into play in ways that can surprise you.
How transparency flattening actually works
PNG stores four channels per pixel: red, green, blue, and alpha. The alpha channel is an 8-bit value (0–255) that defines per-pixel transparency. JPG stores three channels: red, green, blue (or, more accurately, Y, Cb, Cr after color-space conversion). To convert PNG to JPG, the alpha channel must be eliminated.
The Canvas API performs flattening by compositing the PNG onto an opaque background. By default, that background is white. For each pixel, the resulting JPG color is calculated as: final = (alpha × foreground) + ((1 − alpha) × background). A fully opaque pixel (alpha = 1.0) keeps its original color. A fully transparent pixel (alpha = 0.0) becomes pure background. Semi-transparent pixels get blended between the two.
Why anti-aliased edges produce white halos
This is the single most common complaint about PNG-to-JPG conversion: a logo that looked clean against a dark website background develops a visible white outline after JPG conversion. The cause is anti-aliasing on the original PNG's edges.
When a graphic was rendered with anti-aliasing, the edge pixels are not 100% colored or 100% transparent — they are partially transparent, sitting between solid foreground and full transparency to create a smooth, sub-pixel-accurate edge. After flattening to white, those semi-transparent edge pixels blend with white, producing a fringe of light pixels around the edge. Place that JPG on a dark background and the fringe becomes visible as a halo.
The fix: match the flattening color to the destination background. If your JPG will be displayed on a black website header, flatten to black instead of white. Most desktop tools (Photoshop's "Save As JPG", ImageMagick's -background) support this. Browser-based Canvas conversion typically defaults to white. If a dark-background JPG is critical, edit the PNG in a graphics editor first, manually compositing onto the right background color before exporting.
Chroma subsampling and sharp graphics
JPG encoders typically apply 4:2:0 chroma subsampling: the chrominance (color) channels are downsampled to half resolution in both dimensions, while the luminance (brightness) channel keeps full resolution. This is invisible on natural photographs, where neighboring pixels share color anyway. It is highly visible on sharp graphics — pure red text on a white background, neon signs in screenshots, color-coded UI elements with thin lines.
The classic test: a row of 1-pixel-wide red lines on a white background, encoded as JPG, will appear smudged and discolored. The same image as PNG looks crisp because PNG preserves every channel at full resolution. If your PNG source has small text, fine red/blue lines, or anything that depends on sharp color boundaries, JPG will visibly degrade it regardless of quality setting. Use WebP or keep the PNG instead.
Why people end up with photos as PNG (and why converting helps)
PNG screenshots are the largest single source of "wrong format" PNG photos online. macOS's default screenshot format is PNG. Windows Snipping Tool defaults to PNG. Many design tools export PNG by default. Email screenshot extensions favor PNG. The result: a 4 MB PNG of a product photograph that, as JPG, would be 350 KB at 85% quality with no visible difference. Converting these is a clean win — smaller files, same visual quality, no functionality lost (no transparency to preserve).
> how_to_convert
- Upload your PNG fileDrag and drop your PNG image into the converter, or click "browse files". Multiple files are supported for batch conversion.
- JPG is pre-selectedThe output format is set to JPG. Adjust the quality slider — 85% gives excellent visual quality with a good file size reduction for most images.
- Download your JPGClick "Convert All", then download files individually or as a ZIP archive.
> png_vs_jpg
| Feature | PNG | JPG |
|---|---|---|
| Compression | Lossless | Lossy (smaller files) |
| File size | Larger | Smaller |
| Transparency | ✓ Yes | ✗ No (white fill) |
| Re-save quality | No degradation | Degrades each save |
| Best use case | Graphics, logos, editing | Photos, web sharing |
| Browser support | All browsers | All browsers |
> when_not_to_convert_png_to_jpg
PNG to JPG is great for photographs trapped in PNG containers. For everything else, it usually destroys important properties of the source image. Five cases where keeping the PNG (or choosing a different target format) is the right call:
1. The PNG has transparency you actually need
If your PNG has a transparent background — logo files, UI icons, sticker assets, watermark overlays — converting to JPG destroys it irrecoverably. The transparent area becomes solid white (or whatever flattening color you specify), and there is no way to recover transparency from a JPG. For these images, convert to WebP instead: significantly smaller than PNG, transparency preserved, supported by all modern browsers.
2. The PNG contains text or fine sharp graphics
Screenshots of code, technical diagrams, infographics with thin lines, software UI captures with small text — all suffer visibly from JPG's chroma subsampling and DCT block boundaries. Sharp transitions between solid colors smear into the surrounding area. Even at quality 95, a screenshot of black text on white as JPG looks worse than the same content as PNG. Keep the PNG, or use WebP lossless if you need a smaller file.
3. The destination supports modern formats
If you are preparing assets for a modern website, app, or CDN, WebP is a better target than JPG: 25–34% smaller files at equivalent quality, alpha channel support, no chroma subsampling smearing on sharp graphics. JPG remains useful only when you specifically need broad compatibility with older systems — email clients, print bureaus, certain document formats. For everything else, prefer WebP.
4. The image is going through more editing
JPG re-encoding causes generation loss: every additional save introduces another quantization pass, compounding artifacts. If your image will be cropped, color-corrected, composited, or otherwise re-saved during further editing, keep it as PNG until the very last step. Only convert to JPG once, at the final delivery point, never as an intermediate format in a multi-step workflow.
5. You need indexed color or 16-bit-per-channel depth
PNG supports indexed color (PNG-8, with a palette of up to 256 colors — extremely small files for graphics with limited color counts) and 16-bit-per-channel depth (used in scientific imaging, HDR captures, color-managed photo workflows). JPG offers neither: standard JPEG is 8-bit per channel only, and it has no palette mode. Convert to JPG only if you can lose these capabilities without consequence.
> when_png_to_jpg_is_the_practical_choice
PNG is the right format for images that need transparency, crisp edges, or repeated lossless editing. But for plain photographs — landscapes, product photos, portraits — PNG produces unnecessarily large files. A 4 MB PNG photo of a product can become a 400 KB JPG with barely any visible quality difference at 85% compression. That gap matters for web performance, email size limits, and storage.
Common situations where PNG to JPG makes the most sense:
- Product and photography images without transparency — if the image doesn't use an alpha channel and is displayed on a solid background, JPG will be significantly smaller with no visible quality trade-off at 85%+ quality settings.
- WordPress media library — many users upload PNG screenshots or photos to WordPress without realizing the file size penalty. Converting to JPG before upload reduces storage usage and page load time.
- Email and messaging — image attachments and embedded photos load faster as JPG. Most email clients have effective payload limits; JPG reliably stays within them.
- Social media posts — platforms like Instagram, Facebook, and X re-encode uploaded images anyway. Starting with a clean JPG at good quality gives better final results than a large PNG.
- Finished design exports — completed design work that won't be re-edited is a good candidate for JPG: smaller storage footprint while maintaining visual quality for delivery.
The important exception: if your PNG has a transparent background — a logo, UI component, or icon — don't convert to JPG, which will fill transparency with white. Use WebP instead: it supports transparency and is still significantly smaller than PNG.