PNG to Animated GIF Converter

Uploads a sequence of PNG frames, quantizes each to a shared 216-color palette, LZW-compresses them per the GIF89a spec, and stitches them into a single infinitely-looping animated GIF with a configurable per-frame delay — all client-side. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool combines several same-size PNG images into a single animated GIF, entirely in your browser, with no server upload.

Each frame is quantized and LZW-compressed exactly as the GIF89a specification requires, then wrapped with the timing and looping metadata that makes it play as an animation.

What Is PNG to Animated GIF Converter?

A client-side PNG-sequence-to-animated-GIF converter that decodes each uploaded frame, builds one shared 216-color palette, compresses every frame's pixel-index stream with a hand-written LZW encoder, and assembles the result into a single valid GIF89a file.

It includes a Netscape looping extension so the animation repeats indefinitely in any standard viewer.

How PNG to Animated GIF Converter Works

Every uploaded frame is decoded to a pixel buffer and validated to share the first frame's exact dimensions; any pixel with alpha below 128 is mapped to a reserved transparent palette index, while opaque pixels are quantized to the nearest color on a uniform 6x6x6 color cube.

Each frame's quantized index stream is LZW-compressed per the GIF spec and written as its own Graphics Control Extension (carrying the delay and transparency flag) plus Image Descriptor block; all frames share one Global Color Table declared once at the top of the file.

When To Use PNG to Animated GIF Converter

Use it to turn a short sequence of exported PNG frames — from a sprite animation, a stop-motion capture, or a simple loading spinner — into a single shareable animated GIF.

It's also useful for quickly previewing how a frame sequence looks in motion before committing to a heavier video-based export.

Features

Advantages

  • Runs entirely client-side; your frames never leave the browser.
  • Produces a real, spec-compliant GIF89a file with an actual LZW-compressed data stream, not a fake or placeholder.
  • Supports per-pixel transparency and a configurable frame delay.

Limitations

  • GIF's 256-color palette means photographic frames can show visible color banding compared to the source PNGs.
  • All frames must share identical dimensions; this tool doesn't crop, pad, or resize mismatched frames automatically.

Examples

Build a 3-frame loading spinner

Input

Three 32x32 PNG frames, 10 centisecond delay

Output

A looping animated GIF that cycles through all three frames every 30 centiseconds

Each frame gets its own Graphics Control Extension carrying the same delay value.

Reject mismatched frame sizes

Input

A 64x64 PNG followed by a 32x32 PNG

Output

An error: "All frames must share the same width and height as the first frame."

GIF's single logical screen size means every frame must be drawn at identical dimensions.

Best Practices & Notes

Best Practices

  • Export all frames at identical dimensions before uploading to avoid the size-mismatch error.
  • Use a shorter delay (fewer centiseconds) for smoother-looking motion, and a longer one for a slideshow-style animation.

Developer Notes

The pure encoding logic lives in a lib function that operates on an array of plain PixelBuffers with no DOM dependency, reusing the same 216-color quantization and hand-rolled LZW compressor approach as the single-frame PNG-to-GIF converter, extended with a Netscape looping extension and one Image Descriptor per frame.

PNG to Animated GIF Converter Use Cases

  • Turning exported sprite-sheet frames into a single animated GIF
  • Building a simple looping loading indicator
  • Combining a short stop-motion PNG sequence into a shareable animation

Common Mistakes

  • Uploading frames of different sizes, which the tool rejects rather than silently cropping or stretching.
  • Expecting perfect color fidelity — GIF's 256-color palette limit means some banding is inherent to the format, not a bug.

Tips

  • Keep frame counts and dimensions modest for faster encoding and a smaller output file.
  • If a frame needs to be fully transparent in spots, make sure its alpha channel is set below 128 there before uploading.

References

Frequently Asked Questions