GUIDE

JPEG, PNG or WebP: which image format should you use?

How JPEG, PNG and WebP store a picture, where quality loss shows, what happens to transparent areas and metadata, and which format suits each job.

By StillKit · Updated

Use JPEG for photos that have to open anywhere, such as an email attachment or an upload form. Use PNG for screenshots, charts, logos and anything with see-through areas, or when every pixel must stay exactly as it is. Use WebP when the site or app you send to accepts it: it handles photos and transparency in smaller files. What sets the three apart is what each one discards to save space.

JPEG keeps the overall picture and discards fine detail

A JPEG encoder splits the picture into blocks of 8 × 8 pixels. It describes each block as a mix of patterns, from smooth shading to fine texture. Then it rounds away the fine patterns that are hard to see. Many encoders also store color at a lower resolution than brightness, because the eye notices changes in brightness first. The quality setting decides how much gets rounded away. This is lossy compression: what is discarded cannot be recovered.

In a busy photo of a street or a face, the loss is hard to spot. It shows first at sharp edges between flat colors. Around text, thin lines and logos you see faint ripples and smudges, and at low quality a smooth sky breaks into visible blocks. That is why JPEG suits photos and does a poor job with screenshots.

PNG keeps every pixel, so photos become large

PNG is lossless: the file decodes to exactly the pixels that were saved. It saves space by finding repeats, such as runs of the same color. It packs them with the same kind of compression that ZIP files use. Screenshots, diagrams and logos have large flat areas, so they often come out smaller as PNG than as JPEG, and their edges stay crisp.

Photos have few exact repeats, because texture and sensor grain make neighboring pixels differ slightly. A 12-megapixel photo holds 36 million color values before compression, three per pixel, and PNG cannot pack them nearly as tightly as JPEG. A PNG photo is often several times larger than a good JPEG of it. Converting a JPEG to PNG does not bring back what JPEG discarded, either: it stores the damaged pixels exactly, in a bigger file.

WebP does both jobs, with a catch for fine color

WebP has a lossy mode for photos and a lossless mode for graphics, and both can store transparency. The lossy mode predicts each block from the pixels around it before rounding detail away. That often gives a smaller file than JPEG for a similar look. The catch is color. At every quality setting, lossy WebP stores color at half the width and half the height of the brightness detail. Thin red lines, small colored text and sharp color borders can look soft, where PNG keeps them sharp.

WebP's other weakness is acceptance. Current browsers display it, but some upload forms, office programs and older apps still take only JPEG and PNG. If a form rejects a WebP file, convert it with Image compressor, set to JPEG, instead of renaming it. A renamed file still contains WebP data.

Transparency survives only in PNG and WebP

A picture with see-through areas stores a fourth value for each pixel, called alpha, which says how opaque the pixel is. JPEG has no alpha, so something must fill those areas when you save one. StillKit fills them with white. Image compressor paints white behind the picture when you choose JPEG, and so does Compress image to target KB, even when you choose WebP there. With WebP or PNG chosen, Image compressor keeps the alpha as it is.

Soft edges need care. The pixels around a cut-out logo are partly transparent, so the outline looks smooth. Blended with white, they stay pale, and the logo shows a light fringe if you later place the JPEG on a dark background. If you know the final background, fill with that color using Image background color, which saves a PNG that you can then convert.

Every lossy save adds damage

Opening a JPEG or lossy WebP, changing it and saving it again makes the encoder round pixels that already carry its earlier rounding. Saving an unchanged picture again at the same setting usually loses little. Cropping, resizing, rotating or lowering the quality between saves gives the encoder new edges and block positions to round. Blur and blockiness then build up with each round.

Image crop, Flip image and Image resize save PNG, and so does Rotate image by any angle while its Corner color is Transparent (PNG). A chain of edits with them loses nothing until the final conversion. The cost is size: a rotated phone photo saved as PNG can be several times larger than the JPEG you started with. Convert it once, at the end, to the format you need.

What StillKit's converters do to your file

Output of each converter
ToolSaves asTransparent areasQuality
Image compressor, WebP (smallest)WebPKept0.1 to 1, starts at 0.8
Image compressor, JPEGJPEGWhite0.1 to 1, starts at 0.8
Image compressor, PNG (no quality loss)PNGKeptNone: lossless
Compress image to target KBJPEG or WebPWhiteChosen to fit your limit

The Format list of Image compressor chooses between the first three rows, and its Quality number is read only for WebP and JPEG. That number goes to your browser's own encoder, so one setting can produce slightly different files in different browsers. A browser that cannot save WebP stops the job with a message instead of quietly saving another format.

All of these tools decode your image into plain pixels and encode a new file from them. EXIF details stored next to the pixels, such as the camera model, the date taken and any GPS location, are therefore not copied. They stay only in your original. Re-encode image metadata does this on purpose and saves a PNG.

The new file can also be larger than the old one. A JPEG saved at low quality has little left to remove. The new encoder also spends data reproducing the old file's blocks, so a WebP copy can come out bigger. The download button shows the new size; compare it with the original before you replace anything. For a hard limit such as 100 KB, read How to get a photo under a file-size limit.

Three cases where the usual advice fails

  • A scanned page of text. A scan is a photo of paper, so JPEG seems right, but the letters are sharp edges that JPEG smudges. Save it as JPEG at a high quality and check the small print at full size. If you only need the words, Image threshold turns the page into pure black and white, which PNG stores compactly.
  • A logo that arrived as a JPEG. Converting it to PNG does not make its background transparent, because the white is part of the pixels. Background remover can clear a plain background by its color.
  • An animated WebP or PNG. The converters read a single frame, so the result is a still picture.
TRY IT YOURSELF

Tools used in this guide

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →