Home

OLED Bitmap Converter - Free, In Your Browser

Image, GIF, or byte array to Arduino code for SSD1306, SH1106 & U8g2 OLED displays - no upload, no signup.

Guide

Turn a picture into code your OLED can actually show. Upload a PNG, JPG, BMP, WebP, or GIF - or paste a bitmap array from image2cpp, LCD Assistant, or any PROGMEM sketch - and this converter writes a ready-to-run Arduino sketch for it. You choose the board, the display, and the library: Adafruit GFX or U8g2, on Arduino, ESP32, ESP8266, STM32, or Raspberry Pi Pico. A full 128x64 image is 1,024 bytes as a bitmap, but most icons and outlines are far smaller as drawing commands, so Auto mode compares every method and picks the smallest code that still matches your image pixel-for-pixel. Everything runs in your browser. Your images and code are never uploaded to a server, and there is no account to create.

ESP32 Flash Check

Rectangles: 3536 B · Rects + lines: 2626 B · Run-length: 3220 B · Bitmap: 4096 B

Uses 0.2% of the ESP32's 1.25 MB app space flash. Sizes are image data plus any extra drawing code each method needs (measured on Arduino Uno; the display library itself is not counted). ✓ Output checked pixel-for-pixel against your bitmap.

As bitmap 4,096 B 8 × 64x64
Rects + lines (auto) 2,626 B 308 rects + 292 lines · incl. ~190 B code
Memory saved
1,470 B 35.9%

Input Bitmap Code

ESP32

Arduino code (.ino .h .c .cpp .xbm), images (PNG JPG BMP WebP) or an animated GIF. Select several images to make an animation, or drop files here.

Image size (px)
×
Position on screen
X Y

OLED Live Preview

0 Frames
0.96" 128x64 SSD1306
FPS: 15 I2C 0x3C
Playback
15 FPS
Frames Frame 0 / 0
No frames yet

Arduino Code

// Paste bitmap code and press Convert.

Convert an image to an OLED byte array in 4 steps

OLED Bitmap Converter showing an uploaded logo, its live OLED preview, and the generated Arduino byte array
4-step workflow: Upload any image or GIF, configure display parameters, preview live on virtual OLED glass, and export ready-to-run Arduino code.
  1. Upload an image, a GIF, several images for an animation, or an .ino / .h file - or paste your byte arrays.
  2. Choose your microcontroller, OLED display, and graphics library.
  3. Adjust brightness cut-off, dithering and invert until the live preview looks right.
  4. Copy or download the .ino file and upload it with the Arduino IDE.

Worked example: a 64x64 logo is 512 bytes as a bitmap (64 / 8 x 64). In our tests a solid block logo dropped to 74 bytes as rectangles, but a thin ring-and-diamond outline only dropped to 482 bytes, and small icons stayed smaller as bitmaps. The converter shows you both numbers for your own image. See all measured results.

Why this instead of image2cpp?

Image2cpp is excellent for a single static bitmap, and this converter accepts its output directly. Where it goes further is the rest of the job: GIF animations with frame timing, a complete sketch with wiring and setup (not just an array), U8g2 XBM output, and vector code that is measurably smaller for icons and outlines. The full, measured comparison is in the image2cpp comparison guide.

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 frames. Most OLED graphics are outlines, icons and simple shapes, which take far less space as drawing commands - rectangles, lines, or run-length rows. Auto mode compares every method, 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. See our vector code flash guide for benchmark data.

Which displays, boards and libraries are supported?

Displays: 0.96in 128x64 SSD1306, 1.3in 128x64 SH1106, 0.91in 128x32 SSD1306, 1.5in 128x128 SH1107/SSD1327, 0.69in 96x16 SSD1306, 0.66in 64x48 SSD1306.

DisplayDriver ChipRecommended Library
0.96" 128x64SSD1306Adafruit SSD1306 or U8g2
1.3" 128x64SH1106Adafruit SH110X or U8g2
0.91" 128x32SSD1306Adafruit SSD1306 or U8g2
1.5" 128x128SH1107 / SSD1327Adafruit SH110X (SH1107) or U8g2
0.69" 96x16SSD1306Adafruit SSD1306 or U8g2
0.66" 64x48 (Wemos shield)SSD1306U8g2

Libraries: Adafruit SSD1306 / SH110X or U8g2. Boards: Arduino Uno, Nano, Mega 2560, Nano Every, ESP32 (S2, S3, C3), ESP8266 (NodeMCU, Wemos D1), STM32 Blue Pill, and Raspberry Pi Pico (RP2040). Sketches include I2C wiring and store images in flash (PROGMEM), so they do not 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), then call display.display(). This converter writes the whole sketch for you, including display setup at I2C address 0x3C.

Is this an image2cpp alternative?

Yes. 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 - plus a complete sketch, not just an array.

How many bytes does a 128x64 OLED image use?

A 1-bit image uses width / 8 x 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, most-significant-bit first; U8g2 drawXBMP uses least-significant-bit first; some tools output vertical (page) bytes. Pick the matching format and 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.

OLED Guides & Tutorials

More OLED converters