GetResizer
Home / Guides / Image formats
Measure your image

JPG, PNG or WebP?

There is no single smallest format for every image. Compare real exports in your browser, then choose the version that keeps the detail you need.

Try the local format lab

Use an original generated sample or select an image. Each format gets the same canvas; JPG uses a white background for transparent areas. Your image stays on this device.

Enable JavaScript to generate a sample and compare encoded files.

Inputs are compared at up to 1200 pixels on the longest edge. Quality applies to JPG and WebP; PNG is lossless and ignores this quality setting. Results reflect this browser's encoders, not a universal compression ratio.

A format decision you can explain

Choose a starting format, then compare your actual output
Image and destinationStart withCheck before exporting
Opaque photograph for email or older softwareJPGEdges, gradients and broad compatibility
Photo for a modern websiteWebP, compared with JPGActual bytes at the intended display size
Logo, interface or screenshotPNG, compared with WebPSmall text, sharp lines and transparency
Editable vector artworkOriginal SVGWhether paths and required fonts are present
Apple photo for a recipient who cannot open HEICA JPG copyOrientation, colors and lost container features

What this experiment measures

The graphic sample is drawn locally from text, colored shapes and transparent areas. The texture sample combines a gradient with deterministic fine noise. They are test patterns, not photographs and not downloaded stock assets. All three outputs use the same rendered dimensions. JPG flattens transparent areas to white; PNG and WebP retain them when supported.

The lab measures the encoded Blob's bytes, shows the actual exported image and offers a download. It does not calculate a perceptual quality score or declare a winner automatically. Two different browsers may produce different bytes at the same quality value, and 82% JPG is not the same visual quality as 82% WebP. Compare visible detail as well as file size.

Why photographs and screenshots behave differently

A photograph has many small color changes that lossy encoders can approximate. Text and interface graphics have crisp edges where compression artifacts can be obvious. PNG stores rendered pixels losslessly but may be large for complex photos. WebP supports lossy and lossless modes in the format specification; the browser quality control in this lab should not be treated as a dedicated lossless-mode switch.

The smallest measured file is useful only if it meets the destination's needs. Look at thin letters, diagonal lines and smooth gradients at 100% zoom. Then view the result at the size your audience will see. A tiny visual difference at full size may disappear in a thumbnail, while blurred screenshot text may become unreadable.

Transparency is a publishing decision

JPEG does not support transparent pixels. If you convert a logo intended for a dark page to JPG against white, it becomes a white rectangle. PNG and WebP are better starting points for transparency. A semi-transparent edge is blended during flattening, so changing the page background afterward does not reverse that blend.

Conversion does not restore discarded detail

Saving a compressed JPG as PNG preserves its currently decoded pixels, including existing artifacts. Placing a PNG inside an SVG file does not create vector paths. Enlarging a small raster cannot supply factual source detail that was never captured. Keep original files and create each export from them.

Use the comparison in a real workflow

  1. Choose the displayed dimensions with the image size calculator.
  2. Resize the original before aggressive compression.
  3. Compare two plausible formats and inspect the actual downloaded files.
  4. Use the compressor for a byte limit or the converter for a required extension.

Image format questions

Is WebP always smaller than JPG or PNG?

No. Results depend on the image, encoder and quality. Compare actual exported files and the visible detail you need.

Is 82% quality the same in JPG and WebP?

No. Quality values are encoder controls, not a standardized visual score. The same percentage can produce different quality and bytes across formats and browsers.

Does the format lab upload my image?

No. Decoding, comparison and downloads happen locally in your browser. Site analytics and advertising are separate from image processing.

Does the format lab compare SVG or PDF?

No. The lab compares JPG, PNG and WebP exports of the same image with your browser encoders. SVG and PDF workflows have their own pages.