What is a .SWF file?
The .swf is an Adobe Flash binary movie file, formerly known as Shockwave Flash, then Small Web Format file. It was created by FutureWave, developed by Macromedia, and acquired by Adobe. A .swf file contains information such as vector graphics data, raster graphics data, animation frame script timeline, buttons, sprites, text fonts, sound files, video streaming clips, and ActionScript bytecode data for interactivity. This type of file is commonly found in old web-based games, banner advertisements, educational courses on the web, browser-based animations, Flash movie intros, interactive diagrams, and obsolete intranet/CD-ROM media.
There are three binary formats for .swf, that is, the uncompressed one (FWS), compressed using zlib algorithm (CWS), and compressed using LZMA algorithm (ZWS). First three bytes indicate what type of .swf the file is (FWS, CWS, or ZWS): 46 57 53 - uncompressed one, 43 57 53 - zlib compressed, and 5A 57 53 - LZMA compressed. .swf file is different from the FLA file because the former is a playback file whereas the latter is the editable Animate project file. Current browser versions have stopped supporting Flash Player, hence the need to use the standalone player Ruffle or convert to videos or HTML5.
How to open a .SWF file
Open a .SWF file on Windows
- 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
- 2 Double-click your .SWF file if you have an app for .swf files on your computer. In case it does not open, move on to step three.
- 3 Right-click your .SWF file -> select .
- 4 Choose Ruffle in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .swf files" and click OK.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Windows
- Ruffle open-source
- Lightspark open-source
- JPEXS Free Flash Decompiler open-source
- Adobe Animate paid
- VLC media player open-source
- Swivel free
- Apache Royale Compiler open-source
- ruffle_desktop open-source
Open a .SWF file on macOS
- 1 In the Finder app, locate your .SWF file.
- 2 Just double-click your .SWF file in order to automatically launch the program which is connected with it.
- 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select .
- 4 If it isn't in the list, choose and find the application manually.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for macOS
- Ruffle open-source
- JPEXS Free Flash Decompiler open-source
- Adobe Animate paid
- VLC media player open-source
- Elmedia Player freemium
- SWF & FLV Player free
- Swivel free
- Apache Royale Compiler open-source
Open a .SWF file on Linux
- 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
- 2 Double-click the file.
- 3 Or choose another program by right-clicking the file -> .
- 4 Install Ruffle (if it is not installed on your computer) from the software centre, repository or Flathub.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Linux
- Ruffle open-source
- Lightspark open-source
- JPEXS Free Flash Decompiler open-source
- VLC media player open-source
- Apache Royale Compiler open-source
- ruffle_desktop open-source
- FFmpeg open-source
Open a .SWF file on Android
- 1 Launch Files or another file management app.
- 2 In Downloads, find the .SWF file and open it by tapping.
- 3 A list of apps capable of opening the file will be shown. Tap VLC media player and press Always to permanently connect the file type with this app.
- 4 No apps able to open this file? Download VLC media player from the Google Play Store.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Android
- VLC media player open-source
Open a .SWF file on iPhone / iPad
- 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
- 2 Tap the .SWF file you want to open.
- 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
- 4 Touch and hold the file to get the context menu -> choose -> select VLC media player from the list of apps.
- 5 If there is no such option, download the app first from the App Store and then tap the document again.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for iPhone / iPad
- VLC media player open-source
Open a .SWF file online
- 1 Move to the online viewer at the top of this page.
- 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Online
- Ruffle open-source
More details about opening .SWF files
For Windows, choose Ruffle Desktop which allows secure emulated playback of various SWFs archived. It works as if you play something via emulator of the time in which it was created. Lightspark should be capable to open files written using Actionscript 3 but results would greatly vary from that. JPEXS Free Flash Decompiler lets you browse assets of that SWF, decompile them but it does not allow to replay it properly. VLC player and FFmpeg can replay simple SWFs which are similar in behavior to media files. In case you have a source code or assets which still allow to edit your work, use old Adobe Animate. On Linux, use Ruffle Desktop, Lightspark, JPEXS, FFmpeg, and VLC too.
As an option for Mac user you will find mentioned applications above: Ruffle Desktop, JPEXS Free Flash Decompiler, Adobe Animate, FFmpeg and VLC for sure. Elmedia Player and SWF & FLV Player allow opening some files locally. In case you need to convert SWF to MP4 Newgrounds Swivel seems to be a better option for that. On the other hand on Linux OS you can use Ruffle Desktop, Lightspark, JPEXS, FFmpeg, and VLC, and some repositories may still carry older Flash tools but in modern terms emulation seems to be more safe. Unfortunately there are no Flash player installed by default even on Android and iOS phones.
On web one can use Ruffle and install it on his site and replay archived SWFs on current browsers Chrome, Edge, Firefox or Safari with no need for Adobe Flash player at all. If double-clicking is not working try looking for magic number of the file (at offset 0 SWF must contain either FWS/CWS/ZWS). In the same way associate .swf with Ruffle and/or JPEXS programs or select the File menu in one of these two programs and launch it from there. If a screen remains blank put SWF in the directory where it belongs and with required companion assets.
Technical details
SWF is a binary, tag-based format. A SWF starts with a 3-byte marker for file identification ("Magic number"), 1-byte Version Number, and a 32-bit Little Endian size of uncompressed file. FWS is the marker in uncompressed files, the magic bytes are 46 57 53. CWS files have the same 8-byte header but use zlib compression. In ZWS files the 8-byte header is uncompressed, then LZMA-compressed content follows with compressed length stored in the header. According to Adobe documentation, the format is described for Flash 11 generation; nevertheless, the SWF was never standardized to ISO and ECMA open format.
Immediately after the header, there is MovieHeader with packing stage rectangle into bit fields, frame rate and frame count. Next follows SWF Body - sequence of tagged elements. Some examples of tagged elements are: DefineShape, PlaceObject, DoAction, DoABC, DefineBitsJPEG, SoundStreamHead, FileAttributes. AVM1 Bytecode works in ActionScript1.0 and ActionScript 2.0. AVM2 Bytecode together with the new format of bytecode - the ABC was launched with ActionScript3.0 in Flash Player version 9 and consequently SWF version 9 for respective SWF files.
SWF can hold information about vector graphics shapes, gradients, transparency. The format allows embedded fonts, bitmap with information like JPEG and PNG pictures. Audio formats supported: MP3, ADPCM, Nellymoser or Speex compression algorithms are used for audio streams. Additionally, some FLV style videos are allowed to be included into SWF format. Size of a single SWF may vary starting with a couple of kilobytes in order to embed the simple animation to many MBs as in game applications or multimedia courses.
Most commonly used SWF file MIME types are application/x-shockwave-flash, older ones - application/vnd.adobe.flash.movie. SWF files historically were usually used with browsers through flash player plug-in on web server.
How to convert .SWF files
If your SWF is something like a non-interactive animation, tutorial or intro which you would play back on your modern browsers, Facebook, or YouTube player, consider converting it into MP4 form. The most effective tool for converting Flash to MP4 would be either Newgrounds Swivel designed particularly for conversion purposes, or ffmpeg which could work if you could easily decode the content into plain video and audio content. Example: ffmpeg -i input.swf -c:v libx264 -pix_fmt yuv420p -c:a aac output.mp4. You can get still shots of the content using FFmpeg and its option for exporting the frames as images using: ffmpeg -i input.swf frame_%04d.png.
For cases of needing the source of assets for the Flash instead of a movie of the result, you can use JPEXS free Flash Decompiler to export from there all possible components: images, sounds, fonts, shapes, scripts and some bits of FLA or XFL alike. You can republish original FLA files in Animate using the possibilities to HTML5 Canvas, WebGL alike canvas, animated GIF, video, or pure scripting but you cannot make SWFs created earlier by others as fully editable in Animate. If you are thinking about preserving a flash app for web archives, the only way to go with migration, as usual with Ruffle would be not a file-to-file format change.
| Convert to | Tool | Command / note |
|---|---|---|
| MP4 video | FFmpeg | ffmpeg -i input.swf -c:v libx264 -pix_fmt yuv420p -c:a aac output.mp4 Works best for timeline/video-like SWFs; interactive ActionScript, buttons, external assets, and scripted states may not render as intended. |
| PNG image sequence | FFmpeg | ffmpeg -i input.swf frame_%04d.png Useful for extracting rendered frames from simple animations; dynamic interactivity and unsupported Flash features may be skipped. |
| WAV audio | FFmpeg | ffmpeg -i input.swf -vn output.wav Extracts decodable audio streams when present; not all SWFs contain a linear audio track. |
| FLA/XFL or extracted assets | JPEXS Free Flash Decompiler | Open the SWF, then use Export to recover images, shapes, sounds, fonts, scripts, or FLA/XFL-like project data where possible. |
| MP4 video | Newgrounds Swivel | Designed specifically to render Flash animations to video and often handles animation timing better than generic media converters. |
| HTML5 Canvas / JavaScript project | Adobe Animate | Best when the original FLA is available; importing SWF back into Animate is lossy and may not reconstruct editable timelines or ActionScript. |
| Standalone playback page | Ruffle | Embedding a SWF with Ruffle converts playback to a modern WebAssembly/JavaScript runtime rather than changing the SWF file itself. |
Common problems and fixes
"Adobe Flash Player is no longer supported" is displayed by browsers as Flash Player development by Adobe ended and plug-in support via NPAPI and PPAPI were disabled by popular browsers. Run the file with Ruffle Desktop or a Ruffle web page instead of restoring an outdated plug-in.
"This file cannot be opened" or a blank window are symptoms of SWF being compressed using either CWS or ZWS and lack of decompressing capabilities. Most likely JPEXS Free Flash Decompiler will handle these files and for FFmpeg both compression methods require either zlib for CWS or LZMA for ZWS libraries.
"Unexpected end of file" in a decompiler implies that your file has been corrupted or that it is truncated and its length indicator value is wrong. Re-downloaded, checksum checked or archived version should solve it in most cases.
"VerifyError", "TypeError" or "ReferenceError" upon playing SWF indicate some problem on Actionscript level, like incompatibility between scripts and ActionScript runtime or use of some external data and files missing in your case. Save file's directory tree unchanged first before declaring it damaged and trying Ruffle/Lightspark.
SWF may keep getting stuck at its loading screen and make attempts to download additional resources (XML documents, images, sounds and crossdomain.xml file) from its expired domain name. JPEXS may show network requests list which comes useful for legally mirroring the necessary files.
SWFs containing video may run into trouble of unsupported codec. VLC/FFmpeg may report about this issue better way compared to a Flash player.
After removing Flash from your OS, it seems, Windows and macOS may classify .swf files as documents and refuse to open them with proper software. Run SWFs from the browser (e.g., in Ruffle web player) or through Ruffle/LIGHTspark/JPEXS instead. Alternatively, configure your browser/file manager manually.
Security considerations
SWF files will include executable ActionScript bytecode including but not limited to network connectivity, local storage requests, ExternalInterface API function calls, and many more that interact with Flash Player sandboxes. The Flash Player has accumulated countless security vulnerabilities including memory corruption, out-of-bound reads/writes, type confusions, sandbox escapes, etc., which became the main reasons why many browser vendors have chosen to stop supporting it. Avoid loading and executing unknown SWFs with old versions of the Adobe Flash Player especially using older browsers or with locally permitted privileges. For playback purposes try to use Ruffle which is safer regarding memory corruption. In case you need the accurate emulation of legacy SWFs run it in the VM or offline. SWF files include URL, tracking and ID numbers in metadata. Using tools such as JPEXS one can see embedded scripts but in that process, there is a chance of preview running the scripts and/or loading other files online without having network connections forbidden for decompiling. Assume all email attachments from abandoned sites such as game ports and advertisement networks to be hostile.
History and versions
The origin of SWF traces back to FutureSplash Animator from FutureWave dating back to 1996. Macromedia bought the same product at the same year, renaming it Flash. In the last part of 1990 and all through the first decade of 2000, Macromedia Flash became recognized to be used as a standard delivery format for animation, web games, advertisement and video playback applications and RIA in webpages or in web browsers. The use of CWS compression format began in the age of FlashMX and Flash Player 6 in response to dial up and the first years of broadband connection download sizes. Flash Player 9 released in the year 2006 came with ActionScript3 and AVM2 which enabled SWF be not an animation only but with compiled app-bytecode too. Adobe acquired Macromedia in 2005 and continued with Flash Professional; Flash Player, Flex and AIR and the specifications of SWF in Adobe. SWF never became standardized open standard format. Flash not supported by Apple for iPhone and iPad because of its preference of HTML5 video as well as its vulnerabilities made it to decline. EOL was announced in the year 2017 and Flash Player support ended on 31 December 2020. SWF is now mostly useful for migration purpose.
Related formats
.FLA is the editable Adobe Flash/Animate source project and this should be used whenever one wishes to edit their source code since .SWF contains the published results alone. .FLV and .F4V are Flash video file extensions and are more ideal for pure videos, although SWF is able to handle vector animations, scripting codes and video all in a common timeline. Web delivery using HTML, JS and CSS in conjunction with technologies such as canvas is what makes most interactive uses of .SWF irrelevant since they require no plugins for playback. .SVG is an open vector graphics based on the xml format but is not capable of matching SWF legacy runtime application. For animations converted from flash that will require no interaction at all, .MP4 is likely to provide the best option among other files formats. .GIF and .WEBP can however stand in lieu of short animations with no consideration of sound effects as well as complex timing vector scalability and interactivity.
No comments yet. Be the first to share your experience with this file type.