Convert SWF to GIF — Free Online Tool

Convert SWF Flash animations to GIF format directly in your browser, transforming FLV1-encoded video frames into a looping, palette-based GIF using FFmpeg's gif codec. This is especially useful for extracting short animated sequences from legacy Flash files for use in modern web contexts where Flash is no longer supported.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

SWF files typically contain video encoded with the FLV1 (Sorenson Spark) codec, which FFmpeg decodes frame by frame. Each decoded frame is then color-quantized down to a maximum of 256 colors per frame — the hard ceiling of the GIF format — using FFmpeg's built-in palette generation. The resulting GIF is encoded with the gif codec and the -loop 0 flag ensures the animation loops indefinitely. Because GIF is a lossless format at the storage level but uses a severely restricted 256-color palette, the conversion involves a lossy color reduction step: the rich color range of FLV1 video is dithered and quantized to fit GIF's palette constraints. Any audio tracks present in the SWF file are dropped entirely, as GIF has no audio channel support. The output is a self-contained, universally compatible animated GIF.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. In the browser-based version of this tool, this runs via FFmpeg.wasm compiled to WebAssembly, executing entirely client-side without any server upload. On your desktop, this calls your locally installed FFmpeg executable.
-i input.swf Specifies the input SWF file. FFmpeg's SWF demuxer parses the Flash container and extracts the embedded video stream (typically FLV1/Sorenson Spark encoded) for decoding into raw frames.
-c:v gif Sets the video encoder to FFmpeg's built-in gif codec, which encodes each decoded video frame as a GIF89a image frame with an 8-bit, 256-color palette, assembling them into an animated GIF container.
-loop 0 Writes a Netscape application extension block to the output GIF that sets the loop count to infinite (0 means loop forever). This ensures the animated GIF replays continuously in browsers, messaging apps, and image viewers, matching the looping behavior typical of Flash animations.
output.gif Defines the output filename and format. The .gif extension signals FFmpeg to use the GIF muxer, producing a standard GIF89a file containing all animation frames with per-frame timing derived from the original SWF video stream's frame rate.

Common Use Cases

  • Salvaging short animated clips from legacy SWF Flash banners or intros for use in modern web pages, emails, or messaging apps where Flash is completely unsupported
  • Extracting looping animated sequences from archived Flash games or educational content to create shareable reaction GIFs or documentation assets
  • Converting Flash-based animated logos or motion graphics into GIF format for use in tools like PowerPoint, Slack, or Discord that natively support animated GIFs
  • Preserving historical Flash animations from early 2000s websites as GIFs before the source SWF files become completely inaccessible due to browser and OS deprecation
  • Turning short SWF tutorial animations into GIFs for embedding in README files, wikis, or static documentation sites that cannot render video
  • Creating lightweight animated thumbnails or previews from Flash content for use in social media posts or blog headers

Frequently Asked Questions

This is a fundamental limitation of the GIF format, not a problem with the conversion tool. GIF supports a maximum of 256 colors per frame, while the FLV1-encoded video inside your SWF can contain millions of colors. FFmpeg must quantize and dither those colors down to fit the palette, which causes visible banding, color shifts, and loss of gradients. Animations with flat colors or simple vector art convert much better than those with photographic content or smooth color gradients.
Yes. The FFmpeg command includes the -loop 0 flag, which instructs the GIF encoder to set the Netscape application extension loop count to infinite. This means the GIF will loop continuously in any browser, image viewer, or application that respects the GIF loop metadata, which is essentially all modern software. If you want the GIF to play only once or a specific number of times, you can change 0 to the desired loop count in the command.
No — GIF is a pure image format and has absolutely no support for audio data. Any MP3 or AAC audio tracks embedded in the SWF are silently discarded during conversion. If you need to preserve the audio alongside the animation, you should convert the SWF to a video format like MP4 or WebM instead, which support both video and audio streams.
The default command uses FFmpeg's basic gif encoder, which applies a single global palette. For significantly better color quality, you can use FFmpeg's two-pass palettegen/paletteuse filter pipeline on the command line: first run 'ffmpeg -i input.swf -vf palettegen palette.png' to generate an optimized palette, then run 'ffmpeg -i input.swf -i palette.png -filter_complex paletteuse output.gif'. This generates a palette tuned to the actual colors in your specific SWF content and produces noticeably sharper, more accurate GIFs, especially for animations with varied hues.
Yes. The exact FFmpeg command displayed — 'ffmpeg -i input.swf -c:v gif -loop 0 output.gif' — runs identically on your local desktop installation of FFmpeg with no file size restrictions. Download FFmpeg from ffmpeg.org, replace 'input.swf' with the path to your file, and run the command in your terminal or command prompt. The browser-based tool uses FFmpeg.wasm and is capped at 1GB, but the underlying command is identical to what runs natively.
Yes, and this is one of the most effective ways to shrink GIF file sizes. Add the -vf fps=10 filter to the command to reduce playback to 10 frames per second, for example: 'ffmpeg -i input.swf -vf fps=10 -c:v gif -loop 0 output.gif'. GIFs with many frames at full frame rate can become extremely large because each frame is stored as a full image. Dropping to 10–15 fps is usually imperceptible for simple animations but can cut file size dramatically.

Technical Notes

SWF files are container formats that can embed FLV1 (Sorenson Spark) or MJPEG video alongside MP3 or AAC audio. FFmpeg's SWF demuxer handles both video codec variants, though FLV1 is by far the most common in practice. The gif encoder in FFmpeg produces standard GIF89a output, which is the version that supports animation via multiple image frames with per-frame delay metadata. A critical limitation to be aware of is that GIF's color model is entirely palette-based: each frame gets at most 256 colors from an 8-bit palette, which causes significant color fidelity loss for any SWF content that isn't simple flat-color vector art. GIF also does not support partial transparency (alpha channel) — only binary transparency (fully transparent or fully opaque pixels) — so any semi-transparent elements in the SWF animation will be rendered as either fully opaque or fully transparent. File size can grow substantially for longer or higher-resolution SWF animations because GIF stores each frame as a separate image with LZW compression rather than using inter-frame video compression like FLV1 does. For SWF files containing interactive ActionScript logic or vector graphics rendered at runtime, only the rasterized video stream (if one exists) can be extracted; purely vector/scripted SWF content may not contain a video stream that FFmpeg can decode.

Related Tools