ToolForge

JPG vs PNG vs WebP: Which Should You Use?

Three formats, three different jobs, and one of them is better than the other two at nearly everything on the web. That last part has been true for a few years now and still surprises people, so the figures below are all from published sources rather than reputation.

The short version is in the first table. The rest covers why, the cases where the older formats still win, and whether AVIF should change your answer.

Written by toolforge.websitePublished Last reviewed How we build and check these tools

The decision, in one table

What you haveBest formatWhy
Photograph for the webWebP (lossy, ~80%)Smallest at a given visual quality
Photograph, maximum compatibilityJPEG (~85%)Readable by absolutely everything
Screenshot or UI captureWebP losslessHard edges survive; 26% smaller than PNG
Logo or iconSVG if vector, else WebP losslessSharp at any size, tiny
Image needing transparencyWebPLossy transparency, unlike JPEG
Illustration with flat colourWebP lossless or PNGNo banding in flat areas
AnimationWebP, or a video formatFar smaller than an animated GIF
Photo to be printedJPEG at 95%, or TIFFPrint workflows expect it
Master copy for editingThe original, untouchedEvery lossy save costs something

If you take one thing: WebP is the default now, not the adventurous choice. Every current browser reads it, and it is better than both alternatives at their own specialities — smaller than JPEG for photographs, smaller than PNG for graphics.

What each format actually is

JPEG (1992) is the lossy photographic workhorse — MDN calls it "the most widely used lossy compression format for still images", built on the discrete cosine transform. It discards fine detail your eye is poor at noticing, which makes it excellent for photographs and poor for anything with hard edges. No transparency, no animation.

PNG (1996) is lossless. The W3C specification, now in its third edition, describes it as providing "lossless, portable, well-compressed storage" whose filtering and compression "preserve all information", and positions it as a patent-free replacement for GIF. Full alpha transparency, no animation in ordinary use. Compresses flat colour and repetition brilliantly and photographs barely at all.

WebP (2010) does both. MDN describes its lossy mode as "predictive coding based on the VP8 video codec" and its lossless mode as using "substitutions for repeating data". It supports transparency in both modes and animation, which makes it the only one of the three that covers every case.

Two others belong in the conversation. AVIF compresses better still — MDN puts it at a median 50% reduction against JPEG where WebP achieves 30% on the same set — and GIF is essentially obsolete for still images: every pixel is an index into a palette limited to at most 256 colours, which is why photographs in GIF look posterised.

The numbers

Google's own documentation for WebP gives the comparisons that matter, and they are specific about what was measured:

  • WebP lossy is 25–34% smaller than comparable JPEG at equivalent SSIM quality index. The SSIM qualifier matters — this is a like-for-like perceptual comparison rather than a file-size race at arbitrary settings.
  • WebP lossless is 26% smaller than PNG.
  • Transparency costs about 22% additional bytes in lossless WebP, and lossy WebP with transparency is typically around three times smaller than the PNG equivalent.

A worked example, for a 2000-pixel-wide photograph:

Format and settingRough size
PNG (lossless)4–6 MB
JPEG 95%900 KB
JPEG 80%400 KB
WebP 80%280 KB
AVIF 80%200 KB

The PNG row is the important one. It is not a mistake — a lossless photograph really is roughly ten times a good lossy one, because there is no redundancy in a photograph for lossless compression to exploit. Saving photographs as PNG is one of the most common and most expensive mistakes in image work.

When JPEG still wins

Not many cases, but they are real.

Universal compatibility. Everything reads JPEG: old print software, embedded devices, ancient corporate systems, that one client's photo-upload form written in 2007. If a file has to work everywhere without you being able to test, JPEG is the safe choice.

Print and photography workflows. Labs, stock libraries and camera software expect JPEG or TIFF. Sending WebP to a printer will produce a phone call.

Very old browsers. Only relevant if your analytics actually show them; every current browser handles WebP.

Where JPEG genuinely loses: it cannot do transparency at all, it damages text and line art badly, and it is simply larger than WebP for the same visual result. If your reason for choosing it is habit rather than one of the three above, it is habit.

When PNG still wins

PNG's advantage is that it is lossless and universally supported at the same time — WebP lossless is smaller but slightly less universally handled by non-browser software.

Use PNG for:

Screenshots, if you are not using WebP. MDN's guidance is explicit: "unless you're willing to compromise on quality, you should use a lossless format for screenshots." Text and interface edges are exactly what lossy compression damages first.

Line art, diagrams and logos where you do not have the vector original.

Images with sharp edges against flat colour, where lossy artifacts show immediately.

Anything an external tool must open reliably — a design handoff, an asset going into a print document.

Where PNG genuinely loses: photographs, catastrophically, as the table above shows. And even in its own territory WebP lossless beats it by around a quarter for a file every browser can read, which is why the compressor offers to switch the output to WebP when it notices a PNG that will otherwise only shrink through resizing.

Should you switch to AVIF?

AVIF is the best compressor of the four by a clear margin — MDN's median figures are 50% against JPEG versus WebP's 30% — with support for higher colour depths, transparency and animation. On paper it is the obvious successor.

Three reasons to hold WebP as the default anyway.

Encoding support is less consistent than decoding. A browser that displays AVIF happily may not be able to produce it, which matters for a tool that encodes in the browser. ToolForge's converter and compressor probe this at load — testing whether the canvas will actually emit the format rather than assuming — and only offer AVIF when the answer is yes. That is also why the option sometimes appears on one of your machines and not another.

Encoding is slow. AVIF is computationally much heavier than WebP, which is fine on a build server and noticeable in a browser tab with a batch of large photographs.

The marginal gain is smaller than the first move was. Going from JPEG to WebP is a large, easy win. Going from WebP to AVIF is a further improvement with more friction, and worth it mainly if images dominate your page weight.

The pragmatic position: WebP everywhere, AVIF where you serve multiple formats and can measure the difference. If you are hand-exporting files one at a time, WebP is the sensible stopping point.

Serving more than one format

If you control the HTML, you do not have to choose at all. The picture element offers formats in order and the browser takes the first it understands, so modern visitors get AVIF or WebP and everyone else gets JPEG.

That is the professional answer for a real site, and it costs you generating two or three copies of every image at build time — which is what an image CDN or a framework's image component does for you.

If you are converting files by hand for a CMS that takes one upload, convert to WebP and stop there. It is supported everywhere that matters, and the difference between WebP and a perfectly tuned multi-format setup is much smaller than the difference between WebP and the 4 MB PNG someone was about to upload.

Either way, the format choice is only half of it: an image served in the perfect format at four times the dimensions it displays at is still wasting most of its bytes. Working out the size you need is the other half.

Image Format Converter

Convert between JPG, PNG, WebP, AVIF, and HEIC. It runs in your browser, so the files never leave your machine, and there is nothing to install or sign up for.

Try the Image Format Converter

Frequently asked questions

Is WebP supported everywhere now?

For display in browsers, yes — every current browser reads it, including Safari. The gaps are outside the browser: some older desktop applications, print workflows and third-party upload forms still expect JPEG or PNG, so keep a fallback for files that leave your control.

Does converting JPG to PNG improve quality?

No, and it is a common and expensive mistake. You get a lossless copy of an already-lossy image — the discarded detail does not come back, and the file typically grows several times larger. Conversion cannot undo compression that has already happened.

Which format is best for logos?

SVG, if you have the vector original — it is sharp at every size and usually smaller than any raster version. Failing that, WebP lossless or PNG. Never a lossy format: hard edges pick up visible coloured fringing at settings that look fine on a photograph.

Is WebP lossy or lossless?

Both, which is its main advantage. Lossy WebP competes with JPEG and beats it by 25–34% at equivalent quality; lossless WebP competes with PNG and beats it by around 26%. Transparency works in either mode, unlike JPEG, which has none at all.

What about HEIC, the format my iPhone uses?

HEIC compresses well but is poorly supported outside Apple's ecosystem, which is why it causes so much friction when photos are shared. Convert to JPG or WebP before sending files to anyone or uploading them anywhere.

The short version

WebP is the answer for most images and for most people, and the published figures rather than fashion are why: smaller than JPEG for photographs, smaller than PNG for graphics, transparency and animation in one format. Hold JPEG for compatibility outside the browser and PNG for lossless work that has to open in anything. Consider AVIF when images dominate your page weight and you can serve several formats — and remember that no format choice rescues an image four times larger than the space it is shown in.

Tools that go with this

Each one is here for a specific reason rather than because it is in the same category.

Popular

Image Compressor

Compress JPG, PNG, WebP by quality or target file size

Open Tool

Converts and compresses in one pass, which is the usual reason to change format at all.

Image Metadata Remover

View and remove EXIF, GPS, and hidden data from images

Open Tool

Colour profiles and EXIF do not always survive a conversion — this shows what a file is actually carrying.

New

HEIC to JPG Converter

Convert iPhone HEIC photos to JPG or PNG free

Open Tool

For the fourth format in most people's lives: whatever an iPhone decided to save.

New

SVG to PNG Converter

Convert SVG files to high-resolution PNG images

Open Tool

Relevant when the honest answer is that your logo should not be a raster image at all.

Guide

How Image Compression Works

Why a photo can lose 80% of its bytes and look identical: what lossy compression discards, how quality settings behave, and why PNG ignores them entirely.

Explainer

What Is the Difference Between Lossy and Lossless Compression?

Lossless keeps every pixel; lossy discards what you cannot see. What each one actually promises, why lossless is not "better quality", and which to pick.

How-to

How to Compress Images Without Losing Quality

Truly lossless compression, and visually lossless compression, are different things. Which to use per image type, and where the quality thresholds actually sit.

How-to

How to Compress an Image

Compress JPG, PNG or WebP files in your browser: which preset to use, when to set a target size in KB, and the order of operations that saves the most.

Explainer

What Image Size Should You Use on a Website?

Pixel dimensions, file size and DPI are three different things, and only two of them matter on the web. The sizes to use, and why 300 DPI is meaningless here.

Best practices

Image Optimization Best Practices

The nine things that actually make images fast, in order of impact — right dimensions, right format, lazy loading everything except the one image you must not.

Troubleshooting

Why Your Image Is Still Too Large After Compressing

Six reasons compression did not shrink your file: a PNG that stayed a PNG, dimensions rather than quality, an already-optimised source, or a lying upload limit.

Guide

What Is a HEIC File?

HEIC is the photo format every iPhone has defaulted to since 2017. What it actually stores, why so little non-Apple software opens it, and what to do about it.

Sources

  1. WebP: A new image format for the Web

    Google · Official documentation · accessed 7 September 2026

    Cited for: WebP lossy 25–34% smaller than JPEG at equivalent SSIM, lossless 26% smaller than PNG, alpha at 22% additional bytes, and lossy alpha around 3× smaller than PNG

  2. Image file type and format guide

    MDN Web Docs · Technical documentation · accessed 7 September 2026

    Cited for: JPEG as DCT-based and the most widely used lossy format, WebP's VP8 predictive coding, AVIF's median 50% versus WebP's 30%, GIF's 256-entry palette limit, and the recommendation to keep screenshots lossless

  3. Portable Network Graphics (PNG) Specification (Third Edition)

    W3C · Standards organisation · published 24 June 2025 · accessed 7 September 2026

    Cited for: PNG as lossless, well-compressed storage and a patent-free replacement for GIF

About the author

toolforge.website

Builder and maintainer, ToolForge

Started ToolForge in May 2026 and has built and maintained it since, writing every tool on the site and the documentation that goes with each one.

How we research and check this content · About ToolForge

Part of

Image Compression & Formats

Why lossy compression works, which format to use, what image size a web page actually needs, and why a file is still too big after compressing it.

Browse all image tools
Buy Me a Coffee