Image formats explained: JPG, PNG, WebP, AVIF, HEIC

The same image can be 17 MB as a PNG and a few hundred KB as an AVIF, while a screenshot saved as JPG ends up larger and blurrier than the PNG. Pick the wrong format and the upload fails or the picture degrades. This guide explains the common formats, shows with our own measurements what each is good at, and recommends a format for each situation.

Last checked: November 19, 2026

The common formats at a glance

FormatCompressionTransparencyAnimationBest forCompatibility
JPG / JPEGLossyNoNoPhotosEverywhere
PNGLosslessYes, including partialNoScreenshots, logos, images with textEverywhere
WebPLossy or losslessYesYesWeb imagesAll major browsers; some older software and upload forms refuse it
AVIFLossy or losslessYesYesWeb images (smallest files)Recent browsers; slow to encode, many upload forms refuse it
HEIC / HEIFLossyYesYes (bursts, Live Photos)iPhone photo storageNative on Apple devices; often not accepted on Windows or web forms
GIFLossless but 256 colours maxOn/off onlyYesSimple animationsEverywhere
SVGVector, not pixelsYesYesIcons, logos, diagramsBrowsers; most upload forms refuse it, and it can’t store photos

In short: JPG for photos, PNG for screenshots and anything with text or lines, WebP or AVIF for your own website, and convert iPhone photos to JPG before sharing or uploading them.

Lossy versus lossless

Lossless compression (PNG, lossless WebP, GIF) restores every pixel exactly, which matters for text, lines and flat colours where any distortion shows. Lossy compression (JPG, lossy WebP, AVIF, HEIC) throws away detail the eye barely notices in exchange for much smaller files. It works brilliantly on photos and badly on text and fine lines, which pick up blur and speckles.

Lossy formats re-compress every time you save. We re-saved a 2048×1536 test image as JPG 20 times. At a constant quality of 80, quality dipped slightly in the first few saves and then held steady. When the quality changed on each save — as happens when an image goes back and forth between apps — it kept falling: peak signal-to-noise ratio dropped from 37.7 dB to 31.0 dB after 20 saves, a drop of about 6.7 dB, compared with 37.3 dB to 36.7 dB at constant quality.

Tip

Keep the original, start every edit from it, and export once at the end. Avoid passing the same JPG through several apps.

Measured: the same image in different formats

Method: we generated three test images and saved each with common encoders (libjpeg, libwebp, libavif and zlib), recording the file sizes. The photo test image is 4032×3024 pixels — 12 megapixels, like a phone photo — with grass texture, hard edges and noise. Real photos vary with their content, but the gaps between formats are similar.

Photo: 4032 × 3024
Format and qualityFile sizeCompared with JPG quality 90
PNG (lossless)17.6 MBabout 8.8×
JPG quality 953.5 MB1.7×
JPG quality 902.0 MB1
JPG quality 801.1 MB57%
JPG quality 70843 KB41%
JPG quality 50581 KB28%
WebP quality 80480 KB23%
AVIF quality 50318 KB16%
Web page screenshot: 1440 × 900, mostly text and flat colour
FormatFile sizeNotes
PNG193 KBLossless
PNG (256 colours)75 KBWorks for screenshots with few colours; text stays sharp
JPG quality 90203 KBLarger than PNG, with speckles around text
WebP lossless14 KBLossless at 7% of the PNG size
AVIF quality 6018 KBLossy
Icon with a transparent background: 512 × 512
FormatFile sizeNotes
PNG14.4 KBKeeps transparency
PNG (256 colours)6.1 KBKeeps transparency
WebP lossless5.6 KBKeeps transparency
AVIF quality 604.6 KBKeeps transparency, lossy
JPG quality 9021.5 KBTransparency becomes white, and it is the largest

Takeaways: lossy formats make photos an order of magnitude smaller, and WebP and AVIF beat JPG. For screenshots and icons JPG is the worst choice; PNG or lossless WebP is better. Quality numbers are not comparable between formats — WebP quality 80 is not the same as JPG quality 80.

Which format to use when

  • Application portals, government sites, ID photo uploads: JPG. Nearly all accept only JPG or PNG, and JPG makes size limits easy to meet.
  • Screenshots, spreadsheets, chat logs, posters with text: PNG. Lossless WebP is far smaller, but check the destination accepts it.
  • Logos, stickers and cut-out product images with transparency: PNG or WebP, never JPG.
  • Your own website or blog: WebP for compatibility or AVIF for the smallest files, with JPG as a fallback.
  • iPhone HEIC photos: convert to JPG for Windows users, web uploads and printing.
  • Simple animations: GIF is the most compatible; on the web, animated WebP or video uses far less data.
  • Icons and diagrams: SVG scales without blur; export PNG where SVG isn’t accepted.

Dealing with iPhone HEIC photos

Since iOS 11, iPhones save photos as HEIF (.heic files) by default. It compresses better than JPG and saves storage, but many Windows PCs, web forms and print shops don’t accept it.

  • Shoot JPG from now on: Settings → Camera → Formats → Most Compatible.
  • Convert automatically when copying to a computer: Settings → Photos → Transfer to Mac or PC → Automatic.
  • Photos that are already HEIC: convert them in bulk with the HEIC to JPG tool. It runs in your browser, so the photos aren’t uploaded.

Transparency and conversion pitfalls

  • JPG has no transparency. Converting a transparent PNG to JPG fills transparent areas with a colour (white in Doc80’s tools). For another colour, fill it first with the transparent background tool.
  • GIF transparency is all or nothing, so soft anti-aliased edges turn jagged. Use PNG or WebP for transparent images.
  • Converting JPG to PNG doesn’t make a photo sharper — lost detail stays lost — it only makes the file much larger.
  • SVG is vector artwork; choose the output size before converting to PNG, as larger means sharper.

Hidden information in photos (EXIF)

Phone photos usually carry EXIF metadata: when the photo was taken, the phone model and, with location on, exact GPS coordinates. Posting the original can reveal where you took it.

Re-encoding an image normally strips this data. Doc80’s converter and compressor rebuild the image in your browser, so exported files don’t carry the original metadata. To see what a photo contains first, use the image metadata viewer.

Frequently asked questions

Is there a difference between JPG and JPEG?

No. They are two extensions for the same format; .jpg dates from when Windows allowed only three-letter extensions.

Why won’t some sites accept WebP?

Many portals and older programs accept only JPG and PNG. Convert WebP to JPG for photos or PNG for screenshots and transparent images.

Does converting PNG to JPG lose quality?

Slightly, because JPG is lossy, and transparency turns white. At quality 85–90 photos look the same; keep screenshots and text images as PNG.

Is AVIF better than WebP?

AVIF is usually smaller at the same quality but slower to encode and unsupported by older devices and many upload forms. Websites can offer AVIF with a WebP or JPG fallback and let the browser choose.

Why is my JPG larger than the original HEIC?

HEIC compresses more efficiently, so the same picture as JPG is larger. Compress it to a target size afterwards if needed.

Sources

The requirements here were checked against these official pages. Rules change, so confirm the latest version before you apply.