AVIF to RAW Converter
Decode a AVIF and export its pixels as headerless RAW bytes — choose the channel order, row order and output (.raw, C/C++ header or hex text).
AVIF to RAW Converter
Load an image to see its first 64 bytes.
–
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Drop a AVIF
It's decoded in your browser.
Choose the pixel layout
RGBA, RGB, BGR, RGB565… plus row order and premultiplied alpha.
Pick the output
Binary .raw, a C header or hex text.
Download and note the size
Width, height and layout are in the file name; RAW has no header.
RGB565 little-endian is what most SPI TFT displays (ILI9341, ST7789) and LVGL expect.
Features
Eight pixel layouts
RGBA, RGB, BGRA, BGR, ARGB, grayscale, gray + alpha and RGB565 — as .raw, a C header or hex.
Nothing uploaded
Decoding and encoding run in your browser tab; the files never leave your device.
About the AVIF to RAW Converter
AVIF needs an AV1 decoder, which is heavy to embed. Decoding it once in the browser and exporting raw pixels gives your firmware, shader or script a flat array it can use immediately.
The AVIF is decoded by your browser (Chrome 85+, Firefox 93+, Safari 16.4+), including its alpha channel.
After decoding, the pixels are read from a canvas and written in the layout you choose — channel order, top-down or bottom-up rows, optional premultiplied alpha — with no header or padding. Snippets for NumPy, FFmpeg and ImageMagick show how to read the file back.
AVIF vs RAW pixels compared
| Property | AVIF | RAW pixels |
|---|---|---|
| Origin / standard | Alliance for Open Media, 2019 (AV1) | No standard — a plain pixel dump |
| Compression | Lossy or lossless (AV1) | None |
| Transparency | Full alpha | If the layout includes it (RGBA, BGRA, ARGB, YA) |
| Colour depth | 8, 10 or 12-bit, HDR | 8-bit channels, RGB565, grayscale |
| Animation / pages | Yes (image sequences) | No |
| Maximum size | Tiled; very large images supported | Any |
| Typical use | Modern websites, phones | Firmware, GPU uploads, NumPy, FFmpeg rawvideo |
| Opens in | Chrome 85+, Firefox 93+, Safari 16.4+, newer editors | Code, FFmpeg, ImageMagick (with size given) |
RAW file sizes
RAW output has no compression, so its size depends only on the dimensions and the pixel layout — exactly width × height × bytes per pixel:
| Image | RGBA / BGRA / ARGB | RGB / BGR | RGB565 · gray + alpha | Grayscale |
|---|---|---|---|---|
| 320 × 240 | 307,200 | 230,400 | 153,600 | 76,800 |
| 800 × 480 | 1,536,000 | 1,152,000 | 768,000 | 384,000 |
| 1920 × 1080 | 8,294,400 | 6,220,800 | 4,147,200 | 2,073,600 |
Sizes in bytes. A C header (.h) is about 6× larger as text, hex text about 3×.
Things to know
- No header. The .raw file contains only pixels; whatever reads it must be told the width, height and layout (they're in the file name).
- Premultiplied or not. Some GPUs and compositors expect premultiplied alpha (RGB × A). Tick the option if yours does.