Home

GIF to OLED Animation Converter

Turn an animated GIF into frame arrays and a ready-to-run sketch for SSD1306 & SH1106 OLEDs

Guide
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.

Play an animated GIF on an OLED display

Upload an animated GIF and this converter splits it into frames, scales them to your OLED screen, converts them to 1-bit pixels and writes an Arduino sketch that plays the animation at the GIF's own speed. It handles transparent GIFs and GIFs that only update part of the picture each frame, so the result matches what you see in your browser.

How to convert a GIF to an OLED animation

  1. Upload your GIF with the Upload button, or drop it anywhere on the page. You can also select several PNG frames at once; they are sorted by name (frame_2 before frame_10).
  2. Pick your board and display. The size is shrunk to fit the screen automatically.
  3. Tune the look with the brightness cut-off, dithering for photos, and invert for dark drawings on a light background.
  4. Check the flash size in the memory panel, then copy or download the sketch.

Tips for great OLED animations

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

DisplayDriver chipLibrary code
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

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 play a GIF on an OLED display with Arduino?

Upload the GIF here. The converter reads every frame and its delay, converts the frames to OLED bitmaps or drawing code, and writes a sketch whose loop() shows the next frame every FRAME_MS milliseconds using millis().

How many animation frames fit on an Arduino Uno?

Each full-screen 128x64 frame needs 1,024 bytes as a bitmap. After the display library, an Uno has roughly 20 KB left, so about 20 full frames. Smaller images, fewer frames or vector code let you fit more; ESP32 and ESP8266 boards have room for hundreds.

Why is my OLED animation too fast or too slow?

The speed is taken from the GIF file. Change it with the Speed slider; the FRAME_MS value in the generated code updates to match. The real speed also depends on how fast your display updates.

Can I convert a colour GIF?

Yes. Colours are turned into black and white using a brightness cut-off, with optional Floyd-Steinberg or Bayer dithering for photos. Tick Invert if the drawing is dark on a light background, because an OLED lights the bright parts.

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.

More OLED converters