Convert Byte Array To Bitmap Online
Convert Byte Array To Bitmap online. All processing happens in your browser.
Drop image here or click to upload
Max 50MB • 100% Private
Paste in raw bytes, set the width, height, and pixel format, and watch the bitmap render on a canvas in milliseconds. Handles RGB, RGBA, BGR, and 8-bit grayscale — useful when you're debugging firmware dumps, sprite sheets, or sensor data and just need to see what those numbers actually look like. And everything runs in your browser. Nothing gets uploaded.
How It Works
The browser reads your byte values, interprets them based on the pixel format you choose (RGB, RGBA, grayscale, etc.), and writes each pixel to an HTML Canvas element. From there you can preview it directly or download the result as a PNG file. The whole thing takes milliseconds — even for large arrays.
Examples
Debugging a 2×2 RGBA Pixel Grid
You’re testing a rendering pipeline and need to verify that four pixels are outputting correct colors.
255,0,0,255, 0,255,0,255,
0,0,255,255, 255,255,0,255
Width: 2, Height: 2, Format: RGBA
2×2 bitmap: red, green,
blue, yellow pixels
Grayscale Sensor Data from an Embedded Device
A thermal sensor outputs 8-bit grayscale values. You’ve dumped 64 bytes and want to visualize the 8×8 grid.
0x1A,0x2F,0x3C,0x4D,0x5E,0x6B,0x7F,0x8A,
0x22,0x35,0x41,0x58,0x63,0x72,0x85,0x91...
Width: 8, Height: 8, Format: Grayscale
8×8 grayscale bitmap showing
heat gradient from dark to light
Verifying a BMP File Header by Rendering Raw Pixel Bytes
You stripped the 54-byte BMP header manually and want to confirm the remaining pixel data is valid before writing a parser.
66,77,0,12,0,0,0,0,0,54,0,0...
(raw BMP pixel data after header)
Width: 100, Height: 75, Format: BGR
100×75 color bitmap rendered
correctly — confirms header
offset was accurate
Who Uses This
Visualize raw pixel buffers dumped from microcontrollers and camera modules.
Debug sprite sheets and texture data stored as byte arrays in asset pipelines.
Preview scientific imaging data — satellite imagery, medical scans, sensor grids — without writing custom viewers.
Reconstruct images from binary file formats during firmware analysis or file carving.
Common Mistakes
The image looks like diagonal stripes or garbled noise. This almost always means the dimensions don’t match the actual data. Double-check your byte count: for RGBA, total bytes should equal width × height × 4.
Your reds and blues are swapped. BMP files store pixels in BGR order. If the source is a Windows bitmap, try BGR format instead of RGB.
Selecting RGB when the data is actually RGBA (or vice versa) shifts every pixel by one byte. The whole image looks like a color-shifted mess. Count your bytes per pixel — if it’s 4, you probably need RGBA.
Technical Details
- Processing: 100% client-side — uses HTML Canvas API
- Browser Support: Chrome, Firefox, Safari, Edge
- Pixel Formats: RGB, RGBA, BGR, Grayscale (8-bit)
- Max Resolution: Limited only by your browser’s canvas size (usually 16,384×16,384)
- Output Format: PNG download
Frequently Asked Questions
What is a byte array in terms of images?
A byte array is just a sequence of numbers (0–255) that represent pixel data. Each pixel takes 1 to 4 bytes depending on the format — one byte for grayscale, three for RGB, four for RGBA. Line them up in the right order with the correct dimensions and you get an image.
How do I convert a byte array to a bitmap in C#?
In C#, you’d typically use MemoryStream and Bitmap class — pass the byte array to a MemoryStream, then create a new Bitmap from that stream. But if you just need a quick visual check, paste the array here instead of writing code. Much faster for a one-off.
Can I convert a bitmap back to a byte array?
This tool goes one direction — bytes to image. For the reverse, most programming languages have built-in methods (like getImageData in JavaScript or Bitmap.LockBits in C#). We do have a separate bitmap-to-byte-array tool if you need it.
Why does my converted image look like random noise?
Nine times out of ten, the width is wrong. If the image dimensions don’t match the data, pixels get offset and everything looks scrambled. Try adjusting the width by a few pixels — when you hit the right value, the image snaps into place.
Is my byte array data uploaded to a server?
No. Everything happens in your browser using the Canvas API. Your data stays on your machine — nothing is sent anywhere. You can even disconnect from the internet after the page loads and it’ll still work.