What is the SWF file format?
Files with the .swf extension contain animations - which can be interactive - stored in a binary multimedia format originally created by FutureWave Software in 1996. The name stands for Small Web Format, reflecting its original goal of delivering compact, bandwidth-friendly animation over the internet.
The format was acquired by Macromedia and later by Adobe, and is used to create and store:
- multimedia content including audio and video,
- vector graphics and bitmaps,
- ActionScript bytecode and interactive applets.
Applications historically used to create .swf files include Adobe Flash and Adobe Animate, which succeeded it; open-source tools such as SWFTools were also available. In 2008, Adobe partially opened the format specification, allowing search engines such as Google and Yahoo to index content inside animations. The format developed over many years: early versions enabled animating only vector graphics, and later releases extended its possibilities to streaming audio and video and basic 3D animation.
Adobe Flash Player - the browser plugin required to play .swf files - reached end of life on December 31, 2020. Files can still be played outside a browser using the standalone Ruffle emulator or via the Internet Archive's Flash preservation player. Source projects were typically saved as .FLA files and compiled to .swf for distribution; related formats include .FLV for Flash video streams and .SWC for reusable Flash component libraries.
Security & safety
RISK: MEDIUMSWF was a notorious malware vector - Flash Player had a long history of critical remote-code-execution CVEs, which is a major reason it was killed. The legacy plug-in is gone, so drive-by SWF exploits in browsers are no longer a live threat. Residual risks: (1) an SWF contains ActionScript that can make network calls or open URLs, so only run untrusted files in the sandboxed Ruffle (preferred) rather than the offline debug projector; (2) malicious .exe 'projector' files pretending to be a harmless animation; (3) never reinstall the discontinued Flash Player from third-party 'codec' sites - those installers are themselves a common malware lure.
Format details
in a nutshellPrograms that open SWF files
Technical details
deep spec| Magic bytes | FWS (46 57 53) = uncompressed; CWS (43 57 53) = zlib-compressed; ZWS (5A 57 53) = LZMA-compressed - all at byte offset 0 |
| Version & length fields | Byte 3 encodes the SWF version number (1-46); bytes 4-7 store the full uncompressed file length as a little-endian uint32 |
| MIME type | application/x-shockwave-flash |
| Compression | None (SWF 1-5); zlib applied after the 8-byte header (SWF 6+, CWS signature); LZMA applied after the 8-byte header (SWF 13+, ZWS signature) - the first 8 bytes are never compressed |
| Coordinate unit | Twip (1/20 of a pixel); all spatial values are stored as twip integers using variable-length SWF bit fields |
| Tag-based structure | Content encoded as tagged records: 2-byte short header (10-bit record type + 6-bit length) or 6-byte long header for payloads ≥ 63 bytes |
| Vector graphics | Shapes defined via SHAPE records with quadratic Bézier curve edges; fill types include solid color, linear/radial gradient, and bitmap |
| Scripting engine | ActionScript 1 & 2 run on AVM1 (stack-based interpreted VM); ActionScript 3 (SWF 9+) runs on AVM2 (register-based, with JIT in some runtimes) |
| Video codecs | Sorenson Spark (SWF 6+), Screen Video (SWF 7+), On2 VP6 and VP6 with alpha channel (SWF 8+) |
| Audio codecs | Uncompressed PCM, ADPCM, MP3, Nellymoser (SWF 6+), Speex (SWF 10+) |
| Font embedding | TrueType outlines converted to SWF shape records; DefineFont2 and DefineFont3 tags include full Unicode character tables |
| 3D transforms | PlaceObject3 tag (SWF 11+) adds a 4×4 perspective matrix enabling 3D rotation and projection of display-list objects |
| Binary data embedding | DefineBinaryData tag (SWF 9+) allows arbitrary raw binary payloads to be stored inside the .swf container |
| Timeline model | Frame-based display list; each frame is a diff of PlaceObject and RemoveObject tags applied to the scene graph - not a full keyframe snapshot |
| Released | 1996 (FutureSplash Animator); Adobe published the SWF File Format Specification, now withdrawn after Flash EOL |
| Open standard | Yes · royalty-free |
| Specification | web.archive.org |
SWF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about SWF files.