JPG, PNG, WebP or HEIC: which image format to use

A practical rule for each job, and the conversion to get there.

Updated · 2 min read

The one-line rules

If you only read this section:

  • Photos you will share or upload: JPG at quality 80 to 90.
  • Screenshots, diagrams, text, logos: PNG. Sharp edges stay sharp.
  • Anything with a transparent background: PNG (or WebP on a website).
  • Images on a website you control: WebP. Smaller than both, supported everywhere.
  • Photos staying on your iPhone: leave them as HEIC. Convert when they need to go somewhere else.

JPG: the photo format

JPG compresses by discarding detail the eye does not notice, which works wonderfully for photographs and badly for text and flat colour, where it produces visible smudges around edges. Every device, site and printer opens it. It has no transparency. Each re-save loses a little more, so edit from an original and export once. Convert with PNG to JPG, WebP to JPG or HEIC to JPG.

PNG: the lossless format

PNG stores every pixel exactly and supports transparency. That makes it right for screenshots, interface graphics, charts, logos and anything you will keep editing. It makes it wrong for photos, where the file is five to ten times the size of a JPG that looks the same. Convert with JPG to PNG when a form or template insists on PNG, or WebP to PNG for an image saved from a website.

WebP: the web format

WebP does both jobs, lossy and lossless, at 25 to 35 percent smaller than JPG or PNG, with transparency. Every current browser displays it, which is why images saved from websites now arrive as WebP. Older desktop software and some upload forms still reject it, so it is a format for web pages you publish, not for files you hand to other people. Convert to it with JPG to WebP or PNG to WebP, and away from it with WebP to PNG.

HEIC: the iPhone format

HEIC is what iPhones have saved photos as since 2017: about half the size of JPG at the same quality, with support for wide colour and live photos. Outside Apple devices it is poorly supported; Windows needs a paid extension and most web forms refuse it. Keep photos as HEIC on the phone and convert copies with HEIC to JPG or HEIC to PNG when they need to go elsewhere. The Windows guide covers the options there.

AVIF and JPEG XL

AVIF is a newer web format, smaller again than WebP, supported by all current browsers and few other programs. JPEG XL is technically the best of the lot and supported almost nowhere except Safari. Both are formats you might receive, not ones to send: AVIF to JPG, AVIF to PNG, JXL to JPG and JXL to PNG turn them into something that opens.

Questions

Should I convert JPG to PNG for better quality?

No. The detail JPG discarded is gone; the PNG will be a large, exact copy of the JPG as it is. Convert only when PNG is required.

Which format for a logo on a website?

SVG if you have it, since it scales perfectly. Otherwise PNG with transparency, or WebP lossless for a smaller file.

What format do I send a photo for printing?

JPG at quality 95 or a lossless PNG or TIFF, at the original resolution. Do not resize down for printing.

Do these conversions keep the photo's metadata?

By default the browser drops EXIF, including location, when it re-encodes. The converter has a "Keep EXIF metadata" option for JPG output when you want it preserved.

Tools mentioned in this guide

More guides