BMP to RAW Converter
Decode a BMP and export its pixels as headerless RAW bytes — choose the channel order, row order and output (.raw, C/C++ header or hex text).
BMP 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 BMP
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 BMP to RAW Converter
BMP already stores raw pixels, but behind a header, with rows stored bottom-up and padded to 4 bytes, in BGR order. Firmware and GPU code usually want tightly packed, top-down pixels in a specific order — this strips the header and padding and writes exactly that.
The BMP is decoded by your browser, which reads 1- to 32-bit bitmaps.
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.
BMP vs RAW pixels compared
| Property | BMP | RAW pixels |
|---|---|---|
| Origin / standard | Microsoft Windows / OS/2 (1980s) | No standard — a plain pixel dump |
| Compression | Usually none (RLE4/RLE8 optional) | None |
| Transparency | Only 32-bit with V4/V5 headers; support varies | If the layout includes it (RGBA, BGRA, ARGB, YA) |
| Colour depth | 1, 4, 8, 16, 24 or 32 bits per pixel | 8-bit channels, RGB565, grayscale |
| Animation / pages | No | No |
| Maximum size | Signed 32-bit width/height (memory-bound) | Any |
| Typical use | Windows apps, embedded displays, machine tools | Firmware, GPU uploads, NumPy, FFmpeg rawvideo |
| Opens in | Every Windows program, browsers, most 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.