IMG

Image file formats, explained in one table

Raster or vector, lossy or lossless, transparency, animation and the bytes that identify each file. WhatFileType covers 27 image formats; these are the eleven you will actually meet.

Photographs want a lossy raster format (JPEG, or WebP and AVIF where they are accepted). Logos and icons want a vector format (SVG) or, failing that, a lossless raster with transparency (PNG). Everything else is a special case, and the table below tells you which.

The formats side by side

Name, MIME type and signature come from this site's corpus. The capability columns are read from the open formats dataset that imageconvert.tools publishes under CC BY 4.0 alongside its browser-side converter, which is also where you go when the table tells you a format cannot do what you need.

FormatTypeCompressionTransparencyAnimationSinceMIME typeSignature
.png PNGrasterlosslessyesno1996image/png89 50 4E 47 0D 0A 1A 0A
.jpg JPGrasterlossynono1992image/jpegFF D8 FF E0
.webp WebPrasterbothyesyes2010image/webp52 49 46 46 ?? ?? ?? ?? 57 45 42 50
.avif AVIFrasterbothyesyes2019image/avif00 00 00 1C 66 74 79 70 61 76 69 66
.gif GIFrasterlossless, 256 coloursyesyes1987image/gif47 49 46 38 39 61
.bmp BMPrasteruncompressednono1990image/bmp42 4D
.tiff TIFFrasterbothyesno1992image/tiff49 49 2A 00
.ico ICOcontainerdepends on payloadyesno1985image/x-icon00 00 01 00
.heic HEICcontainerlossy (HEVC)yesyes2015image/heic00 00 00 18 66 74 79 70 68 65 69 63
.svg SVGvectorn/a (text)yesyes2001image/svg+xml3C 3F 78 6D 6C
.pdf PDFcontainerdepends on contentyesno1993application/pdf25 50 44 46 2D

Raster or vector

A raster image is a grid of pixels. Its size is fixed at creation: scale it up and the pixels get bigger, scale it down and detail is thrown away. Every photograph, screenshot and scan is raster, and so are PNG, JPEG, WebP, AVIF, GIF, BMP and TIFF.

A vector image is a list of instructions: draw a circle here, a path there, fill it with this colour. It has no native size, so it renders sharp at any scale and usually weighs a fraction of the raster equivalent. SVG is the only vector format on the web. Logos, icons, charts and type belong in it whenever the source is vector; a photograph cannot be turned into one.

Three entries in the table are containers rather than image encodings. ICO wraps one or more PNG or BMP images at different sizes for an icon. HEIC wraps HEVC-compressed frames. PDF wraps pages that may contain raster images, vector drawings and text at once.

Lossy or lossless

Lossless compression (PNG, GIF, lossless WebP) rebuilds the exact pixels you saved. Lossy compression (JPEG, lossy WebP, AVIF, HEIC) throws away detail the eye is bad at seeing and gets files several times smaller in return. Save a photograph lossy once, at the end; every further lossy save adds a new round of loss on top of the last. Save flat graphics, screenshots and anything with text lossless, because lossy artefacts cluster exactly on sharp edges.

AVIF and WebP can do both. That is the reason they are replacing the older pair: one format for photographs and graphics, with transparency and animation on top, at 25 to 50 percent smaller files than JPEG or PNG for the same appearance.

Transparency and animation

JPEG has no alpha channel, so transparency has to be flattened before saving; that is the single most common reason a logo arrives with a white box around it. PNG has full 8-bit alpha. GIF has one transparent colour and no partial transparency, which gives it its jagged edges. WebP, AVIF, HEIC and SVG all support real alpha and real animation. Animated PNG exists (APNG) but is a separate extension that most tools do not write.

Telling formats apart by their bytes

The extension is a label; the format is in the first bytes of the file. Every image format opens with a fixed signature, or magic number, and that is what browsers, operating systems and this site's lookup read. A PNG starts with 89 50 4E 47 (a high byte, then the letters PNG); a JPEG with FF D8 FF; a GIF with the text GIF87a or GIF89a; a BMP with the letters BM. WebP and AVIF are trickier: WebP is a RIFF container with WEBP at byte 8, and AVIF is an ISO media box whose brand appears after a length field. The magic-numbers reference lists all of them with offsets, and the signature index lets you look a byte sequence up in the other direction.

Which size does the platform want

Once the format is right, the next question is the pixel size, and each platform has its own. The figures below are the current verified sizes from pixelspec.net, which records when each spec was last checked against the platform.

PlacementPixelsNote
Instagram feed post1080 x 13504:5 portrait, JPG or PNG
Instagram story1080 x 19209:16, JPG, PNG or MP4
YouTube channel art2560 x 1440safe zone in the centre, 6 MB limit
Facebook cover851 x 315cropped differently on phones

Choosing a format

  • Photograph for the web: AVIF, then WebP, with a JPEG fallback for old clients.
  • Logo, icon, diagram: SVG if you have the vector source. Otherwise PNG, or lossless WebP where accepted.
  • Screenshot with text: PNG. Lossy formats smear the letters.
  • Print or archive master: TIFF, or PNG for a single layer. Keep the master lossless and export lossy copies from it.
  • Phone photo to share: the HEIC your camera saved is fine to keep; convert to JPEG only for the recipient who cannot open it.
  • Favicon: an SVG plus a 32 px ICO or PNG for legacy browsers.

Frequently asked questions

What is the difference between a raster and a vector image?

A raster image is a grid of pixels, each with a colour: photographs and screenshots are raster. A vector image is a list of shapes described mathematically, so it can be scaled to any size without blurring: logos and icons are usually vector. PNG, JPEG, WebP and AVIF are raster; SVG is vector.

Which image format is best for the web?

For photographs, AVIF or WebP with a JPEG fallback: both are far smaller than JPEG at the same quality. For graphics with flat colour or transparency, SVG if the source is vector, otherwise PNG or lossless WebP. GIF only survives for short animations where nothing else is accepted.

Does JPEG support transparency?

No. The JPEG format has no alpha channel, so any transparent area is flattened onto a background colour when you save. Use PNG, WebP or AVIF when you need transparency.

How can I tell what format an image really is?

Look at its first bytes, not its extension. A PNG starts with 89 50 4E 47, a JPEG with FF D8 FF, a GIF with the text GIF8. This site's magic-numbers table lists the signature for every format it covers, and the file lookup reads them for you.

Is HEIC the same as JPEG?

No. HEIC is Apple's name for HEIF files that use HEVC compression; it stores the same kind of photo at roughly half the size of a JPEG but is not readable everywhere. Most sharing tools convert it to JPEG on the way out.

Sources and review

Reviewed end to end on 2026-09-04. Signatures and MIME types follow the methodology used for the whole corpus. Format capabilities: the imageconvert.tools formats dataset, CC BY 4.0. Specifications: W3C PNG (Third Edition), ISO/IEC 10918-1 (JPEG), Google WebP container specification, AOMedia AV1 Image File Format, W3C SVG 2, ISO/IEC 23008-12 (HEIF).

Go deeper