What is a QOI File? The Image Format That Fits in 300 Lines
Most image formats come with a spec that runs dozens of pages, years of committee decisions, and enough edge cases to keep decoder authors busy for a lifetime. QOI is not that kind of format. The entire QOI specification fits on a single page, and a working encoder/decoder can be written in about 300 lines of C. In an industry that gave us JPEG 2000, that's almost rebellious.
What is QOI?
QOI stands for Quite OK Image format. It was created by Dominic Szablewski and released in late 2021 with an explicit design goal: be fast, be simple, and be good enough. Not perfect. Just quite OK.
It is a lossless RGB/RGBA image format, meaning every pixel is stored exactly as-is with no quality degradation. The file extension is .qoi.
Key characteristics:
- Lossless only: no quality settings, no compression artifacts
- RGB and RGBA support: transparency is fully supported
- Extremely fast: encoding and decoding are significantly faster than PNG in most benchmarks
- Tiny spec: the format is simple enough that you can read the full specification in under 10 minutes
- No patents, no licensing: fully open and free to use
How Does QOI Work?
QOI uses a combination of simple techniques to compress pixel data:
- Run-length encoding: repeated pixels are stored as a count rather than repeated values
- Small pixel delta encoding: if a pixel is close in color to the previous one, only the difference is stored
- A small hash-based lookup table: recently seen pixels are cached in a 64-slot array; if a new pixel matches one in the cache, only its index is stored
That is the entire format. No entropy coding, no transform, no adaptive anything. The result is a decoder so simple that it can be reimplemented from scratch in an afternoon — and dozens of people have, in every language imaginable.
QOI vs PNG: How Do They Compare?
| QOI | PNG | |
|---|---|---|
| Compression | Lossless | Lossless |
| Transparency | Yes (RGBA) | Yes |
| Speed | Very fast | Slower |
| File size | Slightly larger than PNG | Smaller on most images |
| Browser support | Limited | Universal |
| Software support | Growing | Universal |
| Spec complexity | ~300 lines of C | Very complex |
The trade-off is straightforward: QOI is faster and simpler than PNG, but produces slightly larger files and has nowhere near the same ecosystem support. Most browsers do not render .qoi files natively, and most image editors do not open them without a plugin.
Who Uses QOI?
QOI is particularly popular in:
- Game development: fast decoding matters when loading textures at runtime, and QOI's speed makes it attractive for asset pipelines
- Embedded systems: the simple spec means QOI can run on constrained hardware without a heavy library dependency
- Internal tooling: anywhere you control both the encoder and decoder and want something faster than PNG without the complexity of a binary format you designed yourself
It is not the format you use for a public-facing website. It is the format you use when you need fast, lossless image I/O in a controlled environment and you have the luxury of choosing your own tools on both ends.
How to Open a QOI File
Since browser and OS support for QOI is still limited, opening a .qoi file is not always as straightforward as double-clicking it. A few options:
In your browser: The re;file labs QOI viewer opens QOI files directly in your browser without any upload or install. Drop in the file and it renders immediately.
On your desktop: Several image viewers have added QOI support — XnView and IrfanView both handle it with the right plugin. Native OS support (Windows Photos, macOS Preview) is not yet there as of early 2026.
In code: The reference implementation by Szablewski is a single C header file. Bindings exist for most languages.
How to Convert QOI Files
If you need to convert a QOI file to a more universally supported format like PNG or JPEG, the re;file labs image converter handles QOI as a source format. You can also view and inspect QOI file metadata directly in your browser.
Should You Use QOI?
If you are building a web page: no. Use WebP or PNG. QOI has no browser support and no path to getting it without significant ecosystem adoption that has not happened yet.
If you are building a game, a tool pipeline, or any application where you control the full stack and encoding/decoding speed matters: QOI is worth a look. The spec is genuinely a pleasure to read, the reference implementation drops into a C project with zero friction, and the performance is hard to argue with for lossless use cases.
For most developers, QOI is a fun format to know about and a useful one to have in the toolkit for the right problems. It will not replace PNG. But it was never trying to.