JPG vs PNG vs WebP: Which Image Format Should You Use?
Lossy vs lossless, transparency, photos vs graphics, AVIF, browser support and quality settings — a practical guide to picking JPG, PNG or WebP.
The one distinction that matters: lossy vs lossless
Every image format makes a trade between file size and fidelity, and the first question is whether it is allowed to throw information away. A lossless format (PNG, lossless WebP) stores every pixel exactly; decode it and you get back precisely what went in. A lossy format (JPG, lossy WebP, AVIF) discards detail it predicts you will not notice, which is how a photo that would be 6 MB as raw pixels can become a 300 KB file that still looks fine on a screen.
Lossy compression works brilliantly on photographs because real-world scenes are full of gradual tones, noise and texture where small errors disappear. It works badly on images with flat colours and hard edges — text, line art, user-interface screenshots, charts — because the errors cluster around exactly those edges. That is where you see the familiar JPG “ringing” or smudgy halos around letters.
Lossless compression has the opposite profile. It is very efficient on large areas of identical colour (a screenshot of a mostly white web page compresses superbly) and inefficient on photographic noise, where almost every pixel differs from its neighbour. A photo saved as PNG is commonly several times larger than the same photo as a good-quality JPG, with no visible benefit.
Lossy damage is permanent and cumulative. Opening a JPG, editing it and saving it as JPG again re-compresses already-compressed data. Do this a few times at low quality and artefacts build up. Keep an original (or a PNG master) and export lossy copies from it.
The formats at a glance
| JPG (JPEG) | PNG | WebP | AVIF | |
|---|---|---|---|---|
| Compression | Lossy only | Lossless only | Lossy or lossless | Lossy or lossless |
| Transparency | No | Yes (full alpha) | Yes (full alpha) | Yes (full alpha) |
| Animation | No | APNG variant only | Yes | Yes |
| Best for | Photos where compatibility matters most | Screenshots, logos, graphics, editing masters | Almost anything on the web | Photos on the web where every kilobyte counts |
| Opens everywhere? | Yes, including old software | Yes | All current browsers; most modern apps | All current browsers; patchier in desktop apps and older devices |
JPG dates from the early 1990s and its great strength is universality: every camera, phone, browser, email client, office suite and government upload form understands it. It has no transparency and no lossless mode.
PNG is the standard lossless format. It supports full alpha transparency (smooth, anti-aliased edges, not just on/off), which is why logos and icons are distributed as PNG. It is also the right format for anything you plan to edit further, because re-saving never degrades it.
WebP, developed by Google, does both jobs. Its lossy mode competes with JPG, its lossless mode competes with PNG, and both modes support transparency. Google’s own published comparisons put lossy WebP at roughly a quarter to a third smaller than JPG at similar visual quality, and lossless WebP about a quarter smaller than PNG — your results depend on the image, but the direction is consistent.
AVIF is newer still, based on the AV1 video codec. For photos it usually beats WebP on size at the same visual quality, especially at low bitrates, but encoding is slower and support outside browsers is less complete. Toolywise’s image tools can read AVIF if your browser can display it, but they export only JPG, PNG and WebP because those are the formats browsers can reliably encode from a canvas.
Browser and app support in practice
For websites the support question is now largely settled. Chrome, Edge, Firefox and Safari all display WebP (Safari was the last to add it, in 2020), and all current versions also display AVIF. If you still need to cater for very old browsers, the HTML picture element lets you offer AVIF or WebP with a JPG fallback, and the browser picks the first format it understands.
Outside the browser the picture is messier. Some older desktop software, printing services, marketplaces and official forms still accept only JPG or PNG. Messaging apps may re-compress whatever you send. When the destination is not a web page you control, JPG for photos and PNG for graphics are the choices least likely to be rejected — the image converter switches between them in a click.
- Web page you control: WebP (or AVIF with a fallback).
- Email attachment or document for someone else: JPG for photos, PNG for screenshots.
- Upload form with a format list: whatever it lists; when in doubt, JPG.
- Logo, icon or image with a transparent background: PNG for maximum compatibility, WebP for the web.
- Master copy you will edit later: PNG (or your editor’s native format).
Typical file sizes
Real file sizes depend heavily on content — a foggy landscape compresses far better than a photo of gravel — so treat the table below as rough, illustrative ranges rather than benchmarks. What it shows reliably is the relative pattern.
| Content | JPG, quality ~80 | Lossy WebP, quality ~75 | PNG | Lossless WebP |
|---|---|---|---|---|
| Detailed photo | Roughly 250–600 KB | Usually 25–35% smaller than the JPG | Often 2–4 MB | Somewhat smaller than PNG, still large |
| Screenshot of an app or web page | Similar to PNG or larger, with blurry text | Smaller, but text edges may soften | Often 100–400 KB | Typically smaller than PNG |
| Flat logo or diagram | Larger than it should be, visible halos | Small, but lossless is cleaner | Very small | Very small |
The quickest way to know for your own image is to try. The image compressor re-encodes as you move the quality slider and shows the new size next to the original, so you can see where the curve flattens out.
What the quality setting actually means
The 0–100 quality slider on JPG and WebP encoders is not a percentage of anything measurable. It controls how aggressively the encoder quantises detail, and the same number gives different results in different programs — quality 80 in one app is not quality 80 in another. Use it as a relative dial, and judge by eye at the size the image will actually be shown.
| Quality | Typical use | What to expect |
|---|---|---|
| 90–100 | Archival exports, images that will be edited again | Large files; differences from 85 are rarely visible |
| 75–85 | General web photos, social posts, email | The sweet spot for most photos |
| 60–75 | Thumbnails, backgrounds, strict size limits | Fine for photos at small display sizes; check skies and skin |
| Below 60 | Last resort to hit a hard limit | Blockiness and colour banding become noticeable |
Two habits beat fiddling with quality alone. First, resize before you compress: a 4000-pixel-wide phone photo shown at 1200 pixels wide is carrying about eleven times more pixels than needed, and no quality setting fixes that as well as the image resizer does. Second, look at the worst part of the image — smooth gradients like sky, and fine text — because that is where artefacts show first.
PNG has no quality dial in the same sense. Because it is lossless, the only choices are how hard the encoder searches for a compact encoding and whether to reduce the number of colours (which some dedicated tools do, making the result lossy in effect). Browser-based encoders, including the canvas encoder Toolywise uses, write standard PNGs without colour reduction, so a PNG output can be larger than a PNG that was already optimised by a specialist tool.
Transparency, backgrounds and colour
If your image has transparent areas, converting to JPG forces a decision about what goes behind them, because JPG has no alpha channel. Toolywise paints transparent areas white before encoding a JPG (rather than the black some tools produce). That suits documents and most light-themed pages, but a logo with a transparent background placed on a dark website will show a white box — keep it as PNG or WebP instead.
Watch out for “transparent” images that are not. A logo downloaded as JPG may show a checkerboard pattern that is actually part of the picture. Converting that file to PNG will not make the background transparent; it needs to be cut out in an editor.
Colour can also shift slightly during conversion. Photos from recent phones and cameras sometimes carry a wide-gamut colour profile (such as Display P3). Canvas-based re-encoding generally does not carry embedded colour profiles over, so very saturated colours may look marginally different afterwards. For ordinary web and social use this is rarely noticeable.
Metadata and EXIF: what travels with your image
JPG files straight from a camera or phone usually contain EXIF metadata: camera model, lens, exposure settings, the date and time, an orientation flag, and — if location services were on — GPS coordinates precise enough to identify a home address. PNG and WebP can carry metadata too, though it is less common.
When an image is drawn onto an HTML canvas and re-encoded, which is how the Toolywise image tools work, only the pixels are kept. The new file contains no EXIF, no GPS and no camera data. Modern browsers apply the orientation flag while drawing, so a portrait phone photo comes out the right way up, with the rotation baked into the pixels instead of stored as a flag.
- Good for privacy: compressing or converting a photo before posting it publicly removes location data as a side effect.
- Bad for archives: if you rely on dates or locations for organising photos, keep the originals; the processed copies will not have them.
- Copyright fields stored in metadata are removed as well. If attribution matters, add a visible watermark with the watermark tool instead.
A short decision guide
- Does it need a transparent background? If yes, rule out JPG.
- Is it a photograph or photo-like (gradients, texture)? Choose lossy — WebP for the web, JPG for maximum compatibility.
- Is it text, a screenshot, a chart, a logo or line art? Choose lossless — PNG, or lossless WebP for the web.
- Is it going somewhere with a strict format list? Follow the list.
- Is it larger in pixels than it will ever be displayed? Resize first, then compress.
If you remember only one rule, make it this: photos lossy, graphics lossless, and never convert a lossy file to lossless expecting it to improve. Everything else is fine-tuning.
Sources
Results are estimates for planning and education, not tax, legal, financial or medical advice. Check important decisions with a qualified professional.