Home

GIF to OLED Animation Converter

Convert animated GIFs to Arduino playback code for SSD1306 & SH1106 OLED displays - no upload, no signup.

Guide

A GIF is already an animation - frames, delays, and all. This converter splits it into OLED frames, scales each one to your screen, turns it into 1-bit pixels, and writes an Arduino sketch that plays it 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. You can also select several PNG frames at once; they are sorted by name, so frame_2 comes before frame_10. Check the flash size before you upload: every full-screen 128x64 frame is 1,024 bytes as a bitmap, so a short, simple animation fits an Arduino Uno, and a long one belongs on an ESP32. No signup, no upload - everything runs in your browser.

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.

Turn a GIF into OLED frames

A GIF is already an animation - frames, delays, and all. This converter splits it into OLED frames, scales each one to your screen, turns it into 1-bit pixels, and writes an Arduino sketch that plays it 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.

Animated GIF split into OLED frames with frame timing for Arduino playback
Each GIF frame is converted to a 1-bit monochrome array and timed via millis() without blocking microcontrollers.

Worked example: the converter's built-in 8-frame, 64x64 radar animation is 8 x 512 = 4,096 bytes as bitmaps and 2,626 bytes as rectangles and lines (Adafruit library, extra drawing code included). Compiled for an Arduino Uno, the whole sketch went from 17,428 to 15,972 bytes. A 30-frame full-screen animation would need 30,720 bytes of bitmaps, which is more than an Uno has left after the display library. The number and size of frames set the limit, not the GIF's file size.

How to convert a GIF to an OLED animation in 4 steps

  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, so frame_2 comes before frame_10.
  2. Pick your board and display. The size is shrunk to fit the screen automatically while preserving aspect ratio.
  3. Tune the animation: adjust the brightness cut-off, dithering for photos, invert for dark drawings, and fine-tune playback speed.
  4. Check the flash size in the memory panel, then copy or download the ready-to-run .ino sketch.

How many frames fit? OLED Flash budget table

Every full-screen 128x64 frame is 1,024 bytes as a bitmap, and a 64x64 frame is 512 bytes. This is how many bitmap frames fit in one animation. The Uno numbers come from compiling the converter's sketches with the Arduino AVR compiler; the others follow from the board's flash and the limits below.

Microcontroller Flash for your sketch Full-screen 128x64 frames (bitmap) 64x64 frames (bitmap)
Arduino Uno / Nano 32 KB 18 with Adafruit, 23 with U8g2 (compiled) 36 with Adafruit (compiled)
Arduino Nano Every 48 KB up to 31* up to 63*
Arduino Mega 2560 256 KB up to 31* up to 63*
ESP8266 (NodeMCU / D1) about 1 MB 200 (converter limit) 200 (converter limit)
ESP32 (WROOM / S3 / C3) 1.25 MB (default app space) 200 (converter limit) 200 (converter limit)
Raspberry Pi Pico (RP2040) 2 MB 200 (converter limit) 200 (converter limit)

* AVR boards cannot hold one array larger than 32,767 bytes, and the converter keeps an animation in one array, so 31 full frames is the most per animation even on boards with more flash. The converter reads up to 200 frames from a GIF. Vector code often fits more frames: the radar sample above needs about 330 bytes per frame instead of 512.

Tips for great OLED animations

Vector code for animations

Vector mode turns each frame into rectangles, lines or run-length rows and checks every frame pixel-for-pixel. Each frame is stored on its own (there is no frame-to-frame compression). For the radar sample it saved 36% with Adafruit and 29% with U8g2; for detailed or dithered frames Auto keeps the bitmap. See the measured results in our vector code flash guide.

Supported OLED displays and microcontrollers

Supports SSD1306, SH1106, SH1107, and SSD1327 displays with Adafruit GFX and U8g2 on Arduino Uno, Nano, ESP32, ESP8266, STM32, and RP2040. Full hardware specifications and wiring details are on our homepage.

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. In our compile tests an Uno fits 18 full frames with the Adafruit library and 23 with U8g2. Smaller images or vector code let you fit more; ESP32 and ESP8266 boards fit the converter's 200-frame limit easily.

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. A display can only go so fast: sending a full 128x64 frame over I2C at 400 kHz takes about 25-30 ms, so full-screen animations top out at roughly 30-40 FPS.

Can I convert a colour GIF?

Yes. Colours become 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.

OLED Guides & Tutorials

More OLED converters