GameParticles
Images

Image File Formats Compared: JPG, PNG, WebP, AVIF, SVG

Image file formats compared in one table: JPG, PNG, GIF, WebP, AVIF, SVG, HEIC, TIFF and BMP. See what each is for and which image format to pick for the job.

Updated

The common image file formats are JPG, PNG, GIF, WebP, AVIF, SVG, HEIC, TIFF and BMP. For most purposes the choice comes down to four: JPG for photos that need to open anywhere, PNG for graphics and screenshots that must stay exact, WebP for nearly everything on a website, and SVG for logos and icons. The rest are specialist or legacy formats you mostly convert from.

Image formats comparison table

FormatCompressionTransparencyAnimationOpens in browsersBest for
JPGLossyNoNoAllPhotos, universal sharing
PNGLosslessYesNo (APNG extension)AllScreenshots, logos, text, transparent graphics
GIFLossless, 256 colorsOn or off onlyYesAllShort, simple animations
WebPLossy or losslessYesYesAll currentMost images on websites
AVIFLossy or losslessYesYesAll currentSmallest photos on websites, HDR
SVGVector, not pixelsYesYesAllLogos, icons, charts, illustrations
HEICLossyYesYesRecent Safari onlyStoring photos on Apple devices
TIFFUsually lossless or noneYesNoSafari onlyPrint, scanning, archiving
BMPUsually noneRarelyNoAllLegacy Windows software

Two terms carry most of the table. Lossy compression discards detail for smaller files, and lossless keeps every pixel. The mechanics are in lossy vs lossless compression.

The formats one by one

JPG (JPEG)

The standard photo format since 1992. It is lossy, with a quality setting that trades file size against visible artifacts. It has no transparency and smudges sharp edges, so it is wrong for logos and text. Its strength is that everything opens it. .jpg and .jpeg are the same format.

PNG

Lossless, with full transparency. Ideal for screenshots, interface graphics, logos and line art. Photos saved as PNG are very large. The detailed two-way comparison is in JPEG vs PNG, and the format itself is covered in what is a PNG file.

GIF

Dating from 1987, GIF is limited to 256 colors per frame and to pixels that are either fully transparent or fully opaque. Its one remaining use is simple animation, and even there an animated WebP or a short muted video is much smaller. Do not use GIF for still images. PNG does the same job better.

WebP

Google's web format, released in 2010. It has lossy and lossless modes, with transparency and animation in both, and typically beats JPG and PNG on file size. All current browsers support it. Some older desktop software and upload forms do not. See WebP vs PNG vs JPG for the numbers.

AVIF

A newer format based on the AV1 video codec. It usually compresses further than WebP, particularly for photos, and supports HDR and high bit depths. Encoding is slower and support outside browsers is thinner. Current versions of Chrome, Firefox, Safari and Edge all display it.

SVG

The only vector format on the list. An SVG is a text file describing shapes, so it scales to any size without blurring and is tiny for simple artwork. It cannot represent photos sensibly, and many platforms refuse SVG uploads because the files can contain scripts. See SVG vs PNG.

HEIC

The default photo format on iPhones since iOS 11 in 2017. It stores a photo in roughly half the space of a JPG of similar quality. The catch is compatibility: outside Apple devices, many browsers, websites and applications cannot open it. In practice you convert it before sharing. The steps are in how to convert HEIC to JPG.

TIFF

A flexible container used in printing, scanning and archiving. TIFF files are usually uncompressed or losslessly compressed, can hold multiple pages and layers, and support high bit depths and CMYK. They are large, and most browsers will not display them. Use TIFF when a printer or archive asks for it.

BMP

The old Windows bitmap format, usually with no compression at all. A BMP is far larger than the same image in any compressed format. There is no reason to create one today. If you receive one, convert it.

Which image format to pick

TaskFormatWhy
Photo on a websiteWebP, or AVIF with a WebP fallbackSmallest file at good quality
Photo to email or uploadJPGOpens everywhere
Logo or iconSVG, with PNG exportsSharp at every size
ScreenshotPNGExact pixels, crisp text
Image with transparent backgroundWebP on the web, PNG elsewhereJPG cannot do it
Short animationAnimated WebP or videoFar smaller than GIF
Professional printTIFF or PDF, as the printer specifiesLossless, supports CMYK
Master copy for editingPNG, TIFF or the camera originalNo loss between saves
iPhone photo for a non-Apple recipientConvert HEIC to JPGCompatibility

When in doubt for the web, choose WebP. When in doubt for a person, choose JPG for photos and PNG for everything else.

Converting between formats

Most conversion needs are one of three trips, each with a matching tool.

To WebP. The WebP Converter takes PNG, JPG, GIF, BMP and AVIF files, singly or in a batch, and converts them to WebP with a quality slider. Each file shows the size saved, and the batch downloads as a ZIP. Its output is always WebP.

Between JPG, PNG, WebP and AVIF. The Image Compressor reads PNG, JPG, WebP, AVIF and GIF files and writes JPEG, WebP, AVIF or PNG. Use it to turn a WebP back into a JPG, to produce AVIF, or to shrink files while keeping their format. It includes a before and after preview and an optional resize.

From HEIC. The HEIC to JPG Converter converts HEIC and HEIF photos to JPG, PNG or WebP, with a quality setting and batch download as ZIP. The other two tools are not built for HEIC, so start here for iPhone photos.

Some limits to know before you start:

  • Animated GIFs convert as a single still frame in these tools, not as an animation.
  • Converting to JPG removes transparency. Transparent areas become white.
  • TIFF files generally need to be converted in desktop software first, since most browsers cannot read them.
  • SVG to raster conversion is best done by exporting from the design tool at the pixel size you need.
  • Converting never adds quality. Moving a JPG to PNG or TIFF keeps the existing artifacts in a larger file.

Format is only one of three levers on file size. Pixel dimensions and the quality setting matter as much, and the order to apply them is in how to compress images without losing quality. More converters and editors are in the images category.

Try it

Take one photo and one screenshot and run both through the WebP Converter. Compare the saving on each: the photo that started as a JPG will shrink modestly, and a photo that was saved as PNG will shrink dramatically. That gap is the practical lesson of the table above.

Tools in this guide

Frequently asked questions

What is the best image format for a website?

WebP is the best general choice: it handles photos, graphics and transparency in small files, and all current browsers display it. Use SVG for logos and icons, and consider AVIF for photos when your tools can produce it.

What image format has the highest quality?

Lossless formats keep every pixel, so PNG, lossless WebP and TIFF all preserve full quality. TIFF and camera RAW files are the usual choice for professional editing and print. For viewing, a high-quality JPG or WebP looks the same in a far smaller file.

Which image formats support transparency?

PNG, WebP, AVIF, SVG and TIFF support full transparency with soft edges. GIF supports only fully transparent or fully opaque pixels. JPG and standard BMP files have no transparency, so a transparent image saved in them gets a solid background.

What is the difference between raster and vector image formats?

Raster formats such as JPG, PNG and WebP store a fixed grid of pixels and blur when enlarged. Vector formats such as SVG store shapes as coordinates and stay sharp at any size, which suits logos, icons and diagrams but not photos.

More images guides

JSON Formatter
Developer · Format, validate and minify JSON with syntax highlighting.
↵
Base64 Encode / Decode
Developer · Encode text to Base64 or decode Base64 back to plain text.
↵
URL Encoder / Decoder
Developer · Encode or decode URL components and query strings.
↵
Hash Generator
Developer · Generate MD5, SHA-1, SHA-256 and SHA-512 hashes.
↵
UUID Generator
Developer · Generate UUIDs v4 (random) in bulk with one click.
↵
Regex Tester
Developer · Test regular expressions against text with live match highlighting.
↵
Word Counter
Text · Count words, characters, sentences, paragraphs and reading time.
↵
Case Converter
Text · Convert text between UPPER, lower, Title, camelCase, snake_case and more.
↵
List Sorter
Text · Sort, reverse, deduplicate and shuffle lists of text.
↵
Markdown Preview
Text · Write Markdown and see a live rendered preview side by side.
↵
Percentage Calculator
Numbers · Calculate percentages, increases, decreases and what % one number is of another.
↵
Color Converter
Colors · Convert colors between HEX, RGB, HSL and HSV instantly.
↵
Snake
Arcade · Eat food, grow longer, don't hit the walls. A timeless classic.
↵
2048
Puzzle · Slide tiles and combine them to reach the legendary 2048 tile.
↵
Word Grid
Puzzle · Guess the hidden five letter word in six tries using color clues.
↵
Sudoku
Puzzle · Fill the 9x9 grid with logic. Four difficulties from easy to expert.
↵
Minesweeper
Strategy · Use number clues to clear the minefield. Classic logic, three levels.
↵
Breakout
Arcade · Smash every brick with paddle and ball. Power-ups, combos, endless levels.
↵
Typing Practice
Casual · Build your WPM and accuracy with timed drills from 30 seconds to 5 minutes. Find your weak keys.
↵
TypeRunner
Arcade · Multiplayer typing race. Race friends by link, beat computer runners, or chase your own ghost.
↵
Typing Blocks
Arcade · Type each word before its wooden block lands. Miss, and the pile climbs toward the line.
↵
Bubble Shooter
Arcade · Aim, bank shots off the walls, and pop groups of three or more bubbles.
↵
Road Rush
Arcade · Race seven rivals through traffic and punch your way to the front.
↵