🔒 Never uploaded
EN

Image formats explained: which one to use for what

Updated November 12, 2026

For most pictures you only need a few image formats: JPG for photos, PNG for screenshots, logos and anything transparent, and WebP or AVIF when you want smaller files on a website. GIF still handles simple animation, HEIC is the iPhone photo format, and SVG draws graphics that stay sharp at any size.

In short

  • Photos belong in JPG, while screenshots, logos and pictures with a transparent background belong in PNG.
  • On a website, WebP and AVIF generally make smaller files than JPG and PNG, which is why MDN recommends them.
  • GIF is limited to 256 colors and all-or-nothing transparency, so keep it for simple animations.
  • HEIC saves space on iPhones but does not open in Chrome, so convert HEIC photos to JPG before you share them online.
  • SVG stays sharp at any size because it stores drawing commands instead of pixels.

Try it right here

Convert to
92%

    Pixels or drawing commands

    Image file types store a picture in one of two ways. Raster formats, such as JPG, PNG, GIF, WebP, AVIF and HEIC, save a grid of tiny colored dots called pixels. Vector formats save instructions for drawing shapes instead. SVG is a vector format based on XML, a plain-text markup language, and describes the image as a set of drawing commands. SVG 1.0 became a W3C Recommendation, the finished form of a web standard, on September 4, 2001.

    A raster image has only the pixels it was saved with, so scaling it up makes it look jagged and blurry. A vector image is drawn again at the new size. That makes SVG a good fit for logos, icons and diagrams that must look crisp on a phone and on a large monitor alike.

    Photos are raster files. Choosing among raster formats depends on two things: how a format compresses the picture, and whether it can store transparent areas.

    Lossy and lossless compression

    Compression packs the image data into less space, and it comes in two kinds. Lossy compression drops some detail to make the file smaller. Lossless compression keeps every pixel exactly as it was, so the file stays larger.

    JPG is the most widely used lossy format for still images. Its standard dates from 1992, and the files end in .jpg or, rarely today, .jpeg. Both endings mean the same format, as JPG vs JPEG explains.

    PNG is lossless. It handles more colors than GIF and supports full alpha transparency. The alpha channel is an extra layer that records how see-through each pixel is, so a logo can have soft edges over any background. The W3C approved the PNG specification on October 1, 1996.

    WebP and AVIF each have a lossy and a lossless mode.

    The practical rule follows from this. A photo hides small losses well, and MDN calls JPEG a good fallback for photographs. Screenshots, diagrams and line art show every smudged edge, and MDN prefers lossless encoding for them, as well as for logos.

    What GIF is and where it falls short

    GIF stands for Graphics Interchange Format. The online service provider CompuServe introduced it in 1987, and it supports simple animation.

    A GIF can hold at most 256 colors, far too few for a photo. Transparency is all or nothing: one color in the palette can be marked as transparent, and every other pixel is fully solid. A soft shadow cannot fade into the background, which PNG handles with full alpha transparency.

    Animated GIFs also make heavy files. Google's web.dev guide points out that a GIF is much larger than the same clip saved as a video. For a moving clip on a website, a video file is the lighter choice.

    So the difference between JPEG and GIF comes down to purpose. JPEG is built for photos and has no transparency at all. GIF can animate and can make one color transparent, but its small palette rules it out for photos.

    WebP and AVIF make smaller files

    Google announced WebP in September 2010. By Google's own figures, lossless WebP images are 26% smaller than PNG. Lossy WebP images are 25–34% smaller than comparable JPEGs at equivalent quality. WebP also supports transparency and animation, so it can stand in for PNG and GIF too.

    AVIF version 1.0.0 came out in February 2019. It is open and royalty-free, which means anyone can use it without paying license fees. It stores pictures compressed with AV1, a video codec, inside a HEIF container. The Alliance for Open Media, which publishes the AVIF specification, says AVIF can save over 50% of the file size compared with JPEG and over 30% compared with WebP. AVIF also handles HDR (a wider range of brightness), wide color, transparency and animation.

    Chrome shows AVIF from version 85 and Edge from version 121. Firefox supports it from version 93 and Safari from version 16.1. One drawback: AVIF cannot show a rough preview while it loads, so the whole file has to arrive before the image appears.

    Why HEIC photos open on an iPhone but not in Chrome

    HEIC is the format iPhones use for photos. It is a variant of HEIF, a container format that the Moving Picture Experts Group (MPEG) introduced in 2015. HEIC is the name for HEIF files that hold HEVC-encoded images. Apple adopted it in 2017 with iOS 11. According to Apple, HEIF compresses better than JPEG and uses less storage while the photo looks the same.

    Browsers are another matter. Can I use, a site that tracks browser features, lists HEIC as supported in Safari 17 and later and as not supported in Chrome. Can I use gives the reason: HEIC is hard for browsers to support because it is complex and expensive to license. AVIF uses the same HEIF container, but with a royalty-free codec.

    In practice, HEIC is fine for keeping photos on your iPhone and a poor fit for websites, because Chrome cannot show it. If a site rejects a HEIC photo, convert it to JPG before you upload it. The parts of the format, and the camera setting that switches it off, are explained in what a HEIC file is.

    The best image format for the web

    For a website, pick WebP or AVIF. MDN, Mozilla's reference for web developers, recommends both for raster images, since they generally make smaller files than PNG, JPEG or GIF. Google's web.dev guide gives a similar answer for photos and screenshots: use JPEG, lossy WebP or AVIF. For logos and icons that must scale, SVG avoids blurry enlargements.

    JPEG and PNG remain the fallbacks. MDN calls PNG the fallback for any image that needs transparency, because JPEG has no alpha channel.

    The table sums up the main raster formats.

    If a program or website refuses a WebP or AVIF image you saved, you can convert WebP to JPG or turn AVIF into JPG on this site. The conversion runs in your browser, and the page is not allowed to send your images to other servers. It writes JPG, PNG or WebP, not AVIF or SVG. JPG output has no transparency, so the converter paints see-through areas white, and an animated file becomes a single still image.

    FormatCompressionTransparencyGood to know
    JPGLossyNoneMost widely used lossy format
    PNGLosslessFull alphaSuits screenshots and line art
    GIFAt most 256 colorsOne color, all or nothingSimple animation, heavier than video
    WebPLossy or losslessYesAnimation too; smaller than JPG and PNG (Google)
    AVIFLossy or losslessYesHDR and animation; must load fully before it shows

    Questions? Answers.

    What are five common types of image files?

    Five image file types worth knowing are JPG, PNG, GIF, WebP and HEIC. JPG is the most widely used lossy format for photos, PNG stores graphics without loss, GIF handles simple animation, WebP makes smaller web images, and HEIC is the photo format Apple adopted for iPhones with iOS 11.

    What is the AVIF file format?

    AVIF is an open, royalty-free image format that stores AV1-compressed pictures in a HEIF container. The Alliance for Open Media, which publishes its specification, says it can save over 50% of the file size compared with JPEG. It supports lossy and lossless compression, HDR, transparency and animation. Chrome shows it from version 85 and Safari from version 16.1.

    What does GIF stand for?

    GIF stands for Graphics Interchange Format, introduced by CompuServe in 1987. It supports simple animation, but a GIF holds at most 256 colors and its transparency is all or nothing. For still graphics, PNG offers more colors and full transparency. For animated clips, a video file is much smaller than the same clip as a GIF.

    Which image format makes the smallest files?

    AVIF, if you go by the makers' own figures. The Alliance for Open Media says AVIF can save over 30% compared with WebP, and Google says WebP is smaller than both JPEG and PNG. AVIF has a catch, though: an image must download completely before the browser can show any of it.

    Does converting an image to another format lose quality?

    It can, when the new format is lossy. Saving as JPG or WebP compresses the image again, and the converter on this site uses 92% quality by default. PNG output is lossless, so nothing more is lost. Converting a JPG to PNG does not bring back detail that the earlier JPG compression already removed, though.

    Sources

    The facts in this guide are checked against these sources.

    1. Image file type and format guide (MDN)
    2. Choose the right image format (web.dev (Google))
    3. JPEG (Learn Images) (web.dev (Google))
    4. JPEG (Wikipedia)
    5. PNG (Wikipedia)
    6. WebP (Wikipedia)
    7. AVIF (Wikipedia)
    8. High Efficiency Image File Format (Wikipedia)
    9. SVG (Wikipedia)
    10. An image format for the Web (WebP) (Google)
    11. What is AVIF? (Alliance for Open Media)
    12. Using HEIF or HEVC media on Apple devices (Apple)
    13. HEIF/HEIC image format (Can I use)