Free online image to OLED bitmap converter
This tool converts images, animated GIFs and existing bitmap code into byte arrays and ready-to-run Arduino sketches for monochrome OLED displays. Upload a PNG, JPG, BMP, WebP or GIF, or paste arrays from image2cpp, LCD Assistant, Lopaka or any PROGMEM sketch. You get code for Adafruit GFX or U8g2 on Arduino, ESP32, ESP8266, STM32 and Raspberry Pi Pico.
How to convert an image to an OLED byte array
- Upload an image, a GIF, several images (for an animation) or an
.ino/.hfile, or paste your byte arrays. - Choose your microcontroller, OLED display and graphics library.
- Adjust the brightness cut-off, dithering and invert options until the live preview looks right.
- Copy or download the
.inofile and upload it with the Arduino IDE.
Smaller than a bitmap: vector drawing code
A normal OLED bitmap stores every pixel: a full 128x64 screen is always 1,024 bytes, and an animation multiplies that by the number of frames. Most OLED graphics are outlines, icons and simple shapes, which take far less space as drawing commands. This converter can turn your bitmap into rectangles (fillRect / drawBox), rectangles plus 45° lines (drawLine) or run-length rows.
Auto mode compares every method with the plain bitmap, including the extra library code each one needs, and picks the smallest. Photos and dithered images usually stay as bitmaps. Every result is checked pixel-for-pixel against your original, so the screen shows exactly the same picture.
Supported OLED displays, boards and libraries
| Display | Driver chip | Library code |
|---|---|---|
| 0.96" 128x64 | SSD1306 | Adafruit SSD1306 or U8g2 |
| 1.3" 128x64 | SH1106 | Adafruit SH110X or U8g2 |
| 0.91" 128x32 | SSD1306 | Adafruit SSD1306 or U8g2 |
| 1.5" 128x128 | SH1107 / SSD1327 | Adafruit SH110X (SH1107) or U8g2 |
| 0.69" 96x16 | SSD1306 | Adafruit SSD1306 or U8g2 |
| 0.66" 64x48 (Wemos shield) | SSD1306 | U8g2 |
Boards: Arduino Uno, Nano, Mega 2560 and Nano Every, ESP32 (S2, S3, C3), ESP8266 (NodeMCU, Wemos D1), STM32 Blue Pill and Raspberry Pi Pico (RP2040). The generated sketch includes the I2C wiring for your board and stores images in flash (PROGMEM), so they don't use RAM.
Frequently asked questions
How do I display an image on an SSD1306 OLED with Arduino?
Convert the image to a byte array, store it in PROGMEM and draw it with display.drawBitmap(x, y, array, width, height, SSD1306_WHITE) followed by display.display(). This converter writes the whole sketch for you, including the display setup.
Is this an image2cpp alternative?
Yes. You can paste image2cpp output directly, or upload images and GIFs. It produces the same horizontal byte arrays for Adafruit drawBitmap, XBM arrays for U8g2, and optional vector code that is often much smaller.
How many bytes does a 128x64 OLED image use?
A 1-bit image uses width ÷ 8 × height bytes: 1,024 bytes for 128x64 and 512 bytes for 128x32. Vector drawing code can be much smaller for outlines and simple shapes.
Why does my OLED image look scrambled or mirrored?
The bytes were read in the wrong format or at the wrong size. Adafruit drawBitmap uses horizontal rows with the most significant bit first, U8g2 drawXBMP uses the least significant bit first, and some tools output vertical (page) bytes. Pick the matching format and image size in the converter.
Are my images uploaded to a server?
No. The converter runs entirely in your web browser. Your images, GIFs and code never leave your computer.