image formats
Codec
A codec is software or hardware that compresses and decompresses image data for storage and viewing.
What is Codec?
A codec is software or hardware that encodes (compresses) data into a format and decodes (decompresses) it back for viewing or playback. The word combines "coder-decoder" or "compressor-decompressor." For image formats, HEIC files use the HEVC (H.265) video codec, AVIF files use the AV1 codec, and WebP uses VP8/VP9 codecs.
Importance of Codec
Without the proper codec, devices cannot display certain image formats — which is why Windows cannot open HEIC files without installing an HEVC codec, and why some older Android devices cannot render AVIF images. Understanding codec compatibility helps you choose formats that work across your target platforms and avoid broken images that users cannot view.
Codec in Practice
When you take a photo with an iPhone and save it as HEIC, the device uses the HEVC codec to compress the image to roughly half the file size of an equivalent JPEG. If you then try to open that HEIC file on a Windows PC without the HEVC codec installed, the image will not display. JPEG and PNG files open everywhere because their codecs (DCT and Deflate respectively) are built into all modern operating systems.
Codec Best Practices
- → Check codec support across your target devices before choosing modern formats like AVIF or HEIC.
- → Use JPEG or PNG for maximum compatibility when codec support is uncertain.
- → Install necessary codecs on Windows systems to handle HEIC files from iOS devices.
Example of Codec
Related Terms
Frequently Asked Questions
What is a codec and how does it work?
A codec is software or hardware that compresses data into a storage format and decompresses it back for viewing, with the name combining "coder-decoder." When you save an image, the codec compresses the pixel data using mathematical algorithms to reduce file size. When you open the image, the codec reverses this process to reconstruct the visual data for display.
Why can't some devices open HEIC or AVIF files?
Devices cannot open HEIC or AVIF files when they lack the necessary codecs to decode these formats. HEIC requires the HEVC (H.265) codec, while AVIF needs the AV1 codec — both are newer technologies not built into older operating systems. Windows PCs often need separate codec installation to handle HEIC files from iPhones.
What's the difference between a codec and a file format?
A file format is the container that holds image data (like .JPEG, .HEIC, or .AVIF), while a codec is the compression method used inside that container. For example, HEIC is the file format, but HEVC (H.265) is the codec that actually compresses the image data. The format determines compatibility, but the codec determines how the data is compressed and decompressed.