Image file formats explained
A practical guide · Updated June 2026
Hundreds of image formats have been invented. You will meet about ten. The three or four letters after the dot are the entire user interface for a set of engineering decisions somebody made on your behalf: whether detail was thrown away to save space, whether the picture can have a transparent background, whether it can move, and how many programs on Earth can open it.
This page is a reference for all ten — JPG, PNG, WebP, GIF, SVG, HEIC, TIFF, BMP, AVIF and RAW. For each one: what it is, where you run into it, and what to convert it to when it lands somewhere it does not belong.
The five questions that separate one format from another
Formats look bewildering until you notice they only differ along a handful of axes. Every entry in the table below is just a different set of answers to these five questions:
- Lossy or lossless? Lossy formats permanently discard detail to save space. Lossless formats store every pixel exactly, so re-saving ten times changes nothing.
- Can it be transparent? An alpha channel lets a logo sit on any background colour. Without one, you get a white or black box.
- Can it move? Some formats hold a sequence of frames; most hold exactly one.
- How many colours? Most formats store 8 bits per channel — 16.7 million colours. HEIC and AVIF can store 10 bits, about 1.07 billion, which matters for smooth skies and HDR displays. GIF is capped at 256 colours in a single image.
- Who can open it? The most technically impressive format is useless if your client's laptop shows a grey question mark.
There is a quieter sixth axis: metadata. JPG, HEIC, TIFF and most RAW files carry EXIF data — camera model, timestamp, and often GPS coordinates. PNG and BMP usually do not. If you publish photos straight from a phone, that is worth knowing about; our guide on removing EXIF data covers what to do.
All ten formats at a glance
Sizes below are for the same 1200 × 800 photograph exported at roughly equivalent visual quality, so the numbers are comparable to each other rather than absolute. SVG and RAW are marked separately because they are not the same kind of thing.
| Format | Best for | Lossy or lossless | Transparency | Animation | Typical size | Convert to |
|---|---|---|---|---|---|---|
| JPG / JPEG | Photographs, universal sharing | Always lossy | No | No | ~170 KB | WebP for the web |
| PNG | Screenshots, logos, sharp text | Lossless | Yes, 8-bit alpha | No (APNG is an extension) | ~1.6 MB | WebP, or SVG if it is a logo |
| WebP | Almost anything on a modern site | Both | Yes | Yes | ~120 KB | Nothing — this is the destination |
| GIF | Short loops, memes, simple animation | Lossless within 256 colours | On/off only, no soft edges | Yes | ~610 KB, visibly degraded | MP4 or animated WebP |
| SVG | Logos, icons, charts, line art | Neither — it is vector code | Yes | Yes, via CSS | 1–20 KB for an icon | PNG only when a raster is required |
| HEIC / HEIF | iPhone camera roll | Lossy in practice | Yes | Yes, Live Photo sequences | ~95 KB | JPG to share, WebP to publish |
| TIFF | Scanning, print, archival masters | Usually lossless | Yes | Multi-page, not animated | ~2.9 MB | WebP or JPG to publish |
| BMP | Nothing, in 2026 | Uncompressed | Technically, rarely honoured | No | ~2.8 MB | PNG or WebP immediately |
| AVIF | Squeezing the last bytes out of photos | Both | Yes | Yes | ~85 KB | Nothing, but keep a WebP fallback |
| RAW (CR3, NEF, ARW, DNG) | Editing before anything else happens | Unprocessed sensor data | No | No | ~25 MB per frame | DNG to archive, WebP to publish |
Read down the size column and the whole argument makes itself: the same picture ranges from 85 KB to 25 MB depending only on the container you put it in. Read down the "convert to" column and you get the short version of this entire article.
The photographic formats
JPG — the default for thirty years
JPG throws away detail in a way tuned to human vision: it keeps brightness edges and discards fine colour variation, because your eye is far more sensitive to the former. At quality 80 that trade is invisible on a photograph and cuts the file by roughly 95% against uncompressed. Its weaknesses are equally consistent — no transparency, visible blocky artefacts around hard text, and generation loss if you keep opening and re-saving the same file.
HEIC — what your iPhone actually shoots
HEIC is a HEIF container wrapping HEVC-compressed frames, and it has been the iPhone default since iOS 11 in 2017. It holds about the same visual quality as JPG in roughly half the bytes, plus 10-bit colour, transparency and Live Photo sequences. The catch is compatibility: plenty of Windows apps, older CMS uploaders and web forms still reject it, which is why converting HEIC to JPG is one of the most common conversions people need.
AVIF — the current efficiency champion
AVIF stores a still frame using the AV1 video codec. At matched quality it lands around 30% below WebP and close to 50% below JPG, with 10-bit colour and HDR support. Browser support arrived in Chrome in 2020, Firefox in 2021, Safari in 2022 and Edge in 2024, so in 2026 every current browser handles it — but "current browser" is doing real work in that sentence, and desktop software support still lags. Serve it with a WebP or JPG fallback rather than as your only copy.
RAW — not really an image yet
A RAW file (.CR3 from Canon, .NEF from Nikon, .ARW from Sony, .DNG as the open standard) is a dump of sensor readings, not a picture. It carries 12 or 14 bits per channel instead of 8, which is why you can rescue a blown sky in an editor and cannot in a JPG. It also runs 20–60 MB per frame and cannot be displayed by a browser at all. Treat RAW as a negative: archive it, export from it, never upload it.
The graphics formats
PNG — pixel-perfect, and heavy
PNG compresses losslessly, so a screenshot's text stays crisp and a logo's edges stay clean. It also supports a full 8-bit alpha channel, meaning soft, anti-aliased transparency rather than a jagged cutout. The cost is size: as the table shows, the same photograph is roughly ten times larger as a PNG than a JPG. A useful middle ground most people miss is PNG-8, which quantises the image to a 256-colour palette and often halves the file with no visible change on flat-colour graphics. If you are sitting on a folder of oversized PNGs, converting PNG to JPG is the fastest fix — provided none of them need transparency.
GIF — kept alive by culture, not merit
GIF is a 1987 format limited to 256 colours per frame with on/off transparency and no partial opacity. Its animation support is the only reason it survived. It is also spectacularly inefficient: a three-second screen recording that would be 400 KB as an MP4 routinely runs 8 MB as a GIF. Use it only where the platform accepts nothing else, and convert to MP4 or animated WebP everywhere you can.
SVG — the one that is not pixels
An SVG is a text file describing shapes: lines, curves, fills. Because it is instructions rather than a grid of pixels, it renders perfectly sharp at any size on any screen, from a 16-pixel favicon to a billboard. A typical icon is 1–4 KB, a logo maybe 10–20 KB, and you can restyle colours with CSS. It is the correct answer for every logo, icon and diagram — and completely useless for photographs, since a photo has no shapes to describe. One caution: SVG is code, so only accept SVG uploads from sources you trust.
The all-rounder and the leftovers
WebP — the sensible default
WebP is the only format on the list that does everything the web needs: lossy and lossless modes, full alpha transparency, animation, and universal browser support. At matched quality it runs 25–35% below JPG. We cover it in depth in what is a WebP file, and the head-to-head reasoning in JPG vs PNG vs WebP, so the one-line summary here is simply: if a picture is going on a website and you have no specific reason to choose otherwise, make it WebP.
TIFF — the print and archive workhorse
TIFF is a flexible container, usually holding uncompressed or losslessly compressed data at high bit depth, often with multiple pages in one file. Scanners, print shops and museums use it because it preserves everything and nobody worries about compatibility in 30 years. A single 600 dpi A4 scan can easily reach 40 MB. Keep the TIFF as your master; publish something else.
BMP — a historical artefact
A BMP stores raw pixels with almost no compression: multiply width by height by three bytes and you have the file size, so 1920 × 1080 is about 6 MB regardless of content. It exists because early Windows needed something trivial to read. If a BMP arrives from an old scanner or a legacy system, convert it to PNG for an identical, lossless, far smaller copy.
The extension is a label, not a fact
Renaming photo.png to photo.jpg does not convert anything — it just makes the label lie, and half the time the receiving software will reject the file or open it as garbage. The real format lives in the first few bytes, called the magic number. If you ever need to check what a file actually is, open it in any text editor and look at the very start:
| Format | First bytes (hex) | What you see in a text editor |
|---|---|---|
| JPG | FF D8 FF | Unreadable, often starts with ÿØÿ |
| PNG | 89 50 4E 47 | .PNG |
| GIF | 47 49 46 38 | GIF8 |
| WebP | 52 49 46 46 … 57 45 42 50 | RIFF then WEBP |
| BMP | 42 4D | BM |
| TIFF | 49 49 2A 00 or 4D 4D 00 2A | II* or MM |
| HEIC | … 66 74 79 70 68 65 69 63 | ftypheic a few bytes in |
| AVIF | … 66 74 79 70 61 76 69 66 | ftypavif a few bytes in |
| SVG | 3C 3F 78 6D 6C or 3C 73 76 67 | <?xml or <svg — it is plain text |
Most RAW formats are TIFF-based, so they also begin with II*; Canon's CR3 is the exception and shows ftypcrx. This one trick explains a surprising number of "why won't this upload" problems: the file is a PNG wearing a JPG name badge.
A worked example: auditing one project folder
Here is a real-shaped scenario. A small team has an assets folder for a website refresh containing 43 files:
- 12 iPhone photos in HEIC at about 2.2 MB each — 26 MB
- 8 Canon RAW frames at about 28 MB each — 224 MB
- 15 PNG screenshots at about 1.9 MB each — 29 MB
- 5 TIFF scans of printed brochures at about 42 MB each — 210 MB
- 3 GIF screen recordings at about 8.5 MB each — 26 MB
That is 515 MB, and someone was about to drag most of it into a CMS. Applying the "convert to" column instead:
- The 12 HEIC photos become WebP at 1200 px wide, quality 80 — about 110 KB each, 1.3 MB total.
- The 8 RAW frames stay archived on disk. Only the exports ship: WebP at 1600 px, about 180 KB each, 1.4 MB.
- The 15 screenshots are resized to 1400 px wide and exported as WebP at quality 90 — text stays crisp at roughly 180 KB each, 2.7 MB. Lossless WebP saves only about a quarter against PNG, so it would leave each file near 1.4 MB.
- The 5 TIFF masters stay put; published copies go out as WebP at about 400 KB each, 2 MB.
- The 3 GIFs become MP4 clips at about 1.1 MB each, 3.3 MB.
The published set totals roughly 10.7 MB instead of 515 MB — about a 48× reduction — and nothing was lost, because the RAW and TIFF masters never left the archive. That gap between "the file I have" and "the file I should upload" is where nearly all image bloat lives.
Formats you will meet but should not publish
- ICO — the old Windows favicon format, holding several sizes in one file. Still accepted everywhere, but SVG favicons are sharper. See how to make a favicon.
- PSD, XCF, AI, EPS — editor project files with layers and editable text. They are working documents, not deliverables. Export a flat copy.
- PDF — a page format that can contain images, not an image format. Fine for documents, wrong for a hero banner.
- JPEG 2000, JPEG XL — technically excellent, commercially stranded. JPEG XL in particular is better than AVIF on several measures but has never won consistent browser support. Do not bet a website on either.
Frequently asked questions
How many image file formats are there, and which ones actually matter?
Hundreds have been invented, but ten cover almost everything you will ever open: JPG, PNG, WebP, GIF, SVG, HEIC, TIFF, BMP, AVIF and RAW. Of those, only four are worth publishing on a website — WebP, AVIF, JPG and SVG. The rest are camera formats, print formats or historical leftovers that you should convert before they reach a visitor.
What is the difference between a lossy and a lossless image format?
A lossy format such as JPG permanently discards detail your eye is unlikely to notice, which is how it turns a 2.9 MB image into a 170 KB one. A lossless format such as PNG stores every pixel exactly, so the file you open is identical to the one you saved. Lossy is right for photographs, lossless is right for logos, screenshots and anything with sharp text or flat colour.
Which image format should I use in 2026?
For photographs and most graphics on a website, use WebP — it is supported everywhere and typically 25–35% smaller than JPG. Use SVG for logos, icons and line art. Keep JPG as a fallback when a file has to open in old software, and PNG when you need pixel-perfect lossless quality. AVIF is smaller still and worth serving alongside WebP if your platform supports fallbacks.
Try the free tool — in your browser
Every conversion in the table above takes seconds, and nothing leaves your device — the work happens in your browser, so your files are never uploaded to a server:
- Image Converter — move between JPG, PNG, WebP and HEIC in any direction.
- Image Compressor — hit a file size target with a quality slider.
- Image Resizer — set the exact pixel width before you export.
If you want the reasoning behind the three formats you will use most, read JPG vs PNG vs WebP next, or what is a WebP file for the format that should be your default. For the dimensions and kilobyte budgets to aim at once you have picked a format, see the best image size for a website.