Image and binary file to C array converter
Convert a small image into a monochrome or RGB565 byte array for Arduino, ESP32 and OLED displays with threshold and dithering controls, or turn any binary file or hex bytes into a C byte array.
- Free
- No sign-up
- Works on any device
About Image and binary file to C array converter
Small displays such as SSD1306 OLEDs and TFT screens need pictures stored as arrays of bytes in your sketch. This tool shrinks an image to the size you choose and writes it as a C array. In monochrome mode each pixel darker than your threshold becomes one bit, packed in rows or in vertical pages, with optional dithering. RGB565 mode packs each pixel into 16 bits. A third mode turns any file or pasted hex bytes into a byte array. A 16 by 16 black-and-white icon becomes 32 bytes.
How to use Image and binary file to C array converter
- Pick the mode, then choose an image or file, or leave the sample.
- Set the width, threshold, dithering and the bit layout your display library expects.
- Copy the array into your sketch or download it as a .h file.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
Which bit layout does an SSD1306 OLED need?
SSD1306 memory is organised in vertical pages of 8 pixels with the top pixel in the lowest bit, so choose the vertical pages layout. Adafruit GFX drawBitmap expects rows with the leftmost pixel in the top bit.
Why is my picture upside down or inverted?
Libraries differ on which value means lit. Use the option to set light pixels instead of dark ones, and check the layout setting. Then compare the small preview with your screen.
How large can the converted array be?
Images are limited to 262,144 pixels and binary files to 2 MB so the browser stays responsive. Remember that boards like the Uno have only 32 KB of flash, so keep bitmaps small.
Is Image and binary file to C array converter free?
Yes. Image and binary file to C array converter on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.