A specification you can read in an afternoon
QOI’s entire format fits on a single page, which is precisely the point. It encodes pixels with four tiny chunk types: a run of identical pixels, a reference to one of the last 64 seen colours via a small hash table, a small delta from the previous pixel, or a full literal colour. There are no Huffman tables, no DEFLATE stream and no sliding window — just a single linear pass over the pixels. As a result a complete encoder or decoder can be written in a couple of hundred lines and runs several times faster than libpng.
The trade-off is compression ratio: QOI files are usually a little larger than equivalent PNGs, because it forgoes the heavy entropy coding that PNG relies on. For many images the gap is modest, and the speed gain is the deciding factor.
Where it fits
QOI is not trying to replace PNG on the web; it is aimed at situations where decode speed and code simplicity dominate, such as game asset loading, tooling and embedded contexts with no room for a big image library. Its public-domain status removes any licensing friction, so developers can paste the reference implementation straight into a project. It remains a niche, enthusiast-and-developer format rather than a mainstream one.
Strengths
- Encodes and decodes far faster than PNG.
- Lossless, with a specification small enough to implement quickly.
- Public domain, so it is free of licensing concerns.
Limitations
- Files are typically a bit larger than PNG.
- Niche format with little support in mainstream image software.
- No tiling, layers or progressive features — just plain pixels.
When to use QOI
Use QOI when fast, lossless encoding and a minimal codebase matter more than squeezing out the last few percent of file size — common in game tooling and embedded projects.
QOI FAQ
- Is QOI smaller than PNG?
- Usually not — QOI files tend to be slightly larger because it skips the heavy entropy coding PNG uses. What it gains instead is speed: it can encode and decode several times faster, which is the reason to choose it.
- Is QOI lossless?
- Yes, QOI is fully lossless and reproduces every pixel exactly, including the alpha channel. It simply trades a little compression efficiency for a much simpler, faster algorithm.
- Can I open a QOI file in normal image software?
- Support is still limited because the format is young and niche, so many editors cannot open it directly. Converting it to PNG with a tool like Morphr gives you a file that opens everywhere while staying lossless.