September 18, 2025
By SVG-to.com Editorial Team
What is the QOI format?
The "Quite OK Image" (QOI) format was born out of frustration with the massive complexity of modern image codecs. Here is why developers love it.
The Problem with Modern Codecs
Formats like PNG, WebP, and AVIF are incredibly efficient at compressing data, but their specifications are hundreds of pages long. Writing an encoder or decoder from scratch for PNG requires implementing Deflate/zlib compression. AVIF requires a full AV1 video decoding stack.
In late 2021, developer Dominic Szablewski created QOI with a single goal: create a lossless image format that competes with PNG in file size, but can be encoded and decoded in just a few hundred lines of C code.
How QOI works
QOI doesn't use complex mathematical transforms or heavy dictionary compression. It processes pixels sequentially and uses incredibly simple heuristics:
- If a pixel is the exact same color as the previous one, it just writes a "run length" (e.g., "repeat the last pixel 10 times").
- If a pixel is slightly different from the previous one, it writes the small difference (e.g., "+1 Red, -1 Blue") which takes fewer bits than writing the whole color.
- It maintains a tiny "running array" of 64 recently seen colors. If the current pixel matches one of those, it just writes the index number (0-63).
The Result? Speed.
When should you use QOI?
You generally won't use QOI for standard web design (HTML/CSS), as browser support is not native. However, it is fantastic for:
- Game Development: Loading textures into memory instantly without heavy CPU overhead.
- Embedded Systems: Microcontrollers that don't have the processing power to decode complex PNGs.
- Intermediate processing: Storing temporary lossless frames when rendering video or running computer vision pipelines.
SVG-to.com supports exporting to QOI primarily for developers who need to ingest vector assets into custom engines or embedded interfaces quickly.
Related guides