QOI (Quite OK Image Format)
QOI is a simple, fast lossless image format designed as an alternative to PNG with significantly faster encoding and decoding. Its specification fits on a single page, making it trivial to implement. QOI sacrifices some compression ratio for extreme simplicity and speed.
MIME Type
image/qoi
Type
Binary
Compression
Lossless
Advantages
- + Extremely fast encoding and decoding (20-50x faster than PNG)
- + Trivially simple specification — one page, 300 lines of C
- + Lossless compression with no quality loss
Disadvantages
- − Larger files than PNG (especially for photographs)
- − No browser support — requires conversion for web use
- − New format with limited ecosystem and tool support
When to Use .QOI
Use QOI where encoding/decoding speed matters more than file size — game assets, screenshots, and real-time image pipelines.
Technical Details
QOI uses a 14-byte header followed by a stream of chunks: indexed (1 byte), diff (1 byte), luma (2 bytes), run-length (1 byte), and raw RGB/RGBA (4-5 bytes). A 64-entry hash table tracks recent pixels for indexing.
History
Dominic Szablewski created QOI in 2021, publishing the entire specification and reference implementation in under 300 lines of C. It went viral for its simplicity and reasonable compression, achieving 20-50% of PNG file sizes for photographic content.