Export an animation
Export an animation as a standalone animated SVG that plays in a browser, or as a video file (MP4 or WebM) for documents and slides. Both use the same timing and effects as the preview window, so the export matches the preview. See Animation timing and Animation effects.
Both formats are on the Export menu in the animation toolbar, which is available when the animation has at least two states.
With a LaTeX solution animation active, Export > Animated SVG opens the Export LaTeX Animation dialog, which has its own, shorter set of options.
Export an animated SVG
Section titled “Export an animated SVG”- In the animation toolbar, click Export > Animated SVG. The Export Animated SVG dialog opens.
- Set the options (see the table below).
- Click Export SVG. Molkit saves a single self-contained
.svgfile.
| Option | Effect |
|---|---|
| Filename | The animation’s name, with spaces replaced by underscores. A different name you export under is remembered for that animation and saved with the document. |
| Theme-aware (light/dark) | On by default. The file carries CSS for both color schemes and follows the viewer’s dark-mode preference, including element-colored symbols inside labels. When cleared, your current colors are written directly. |
| Embed fonts for offline use | Appears only when the document uses non-system fonts. Checked automatically when a local font is in use, because local fonts have no online fallback. |
| Mobile-safe rendering | Embeds a small, metric-compatible replacement (Liberation Sans, Serif, or Mono) for any Arial, Helvetica, Times, or Courier text, so labels render the same on phones and tablets that lack those fonts. Off by default; a warning icon shows next to it while it is cleared. |
| Convert labels to paths | Outlines text labels as vector paths, so the file does not depend on a font. Text in the file is then not selectable. |
| Loop continuously | Off by default: the animation plays once and rests on the final state. When on, the animation repeats, and the last state fades out before each restart. |
| Total duration | Shows the animation’s length, from the same timeline as the state strip. |
| Background | Include background adds a background rectangle in the color you pick. When cleared, the background is transparent. On by default, white. |
Your option choices (not the filename) are remembered for the next export, across reloads and documents.
Export several animations
Section titled “Export several animations”When the document holds two or more animations with at least two states each, the dialog has an Animations section. See Several animations in one document.
| Choice | What Molkit saves |
|---|---|
| This animation | The animation you are editing. This is the default. |
| Several, in one file with tabs | One .svg file that holds every ticked animation. One animation shows at a time, and tabs above it switch between them; tabs that do not fit across the drawing wrap onto more rows. Switching starts the chosen animation from its first state. The Filename box names this file. |
| Several, one file each | One .svg file for each ticked animation, named after its export filename or its name. Molkit asks for a folder once. The Filename box is not used. |
A tick box for each animation chooses which ones to include. LaTeX solution animations are exported on their own.
The tabs are drawn by a small script in the file, so they appear when the file is opened on its own, embedded with <object> or <iframe>, or written into a page’s HTML. Where the script does not run, for example when a page shows the file as an image or inserts it with innerHTML, the tabs stay hidden and the first animation plays. A web page can hide the tabs and switch animations with its own controls; see Control animated SVGs. Each animation keeps its own size; a smaller one is centered in the space of the largest.
Where the animated SVG plays
Section titled “Where the animated SVG plays”The animation is written as SMIL elements on the SVG document’s own timeline, so the file needs no script. Open it in any modern browser and it plays immediately. Many image viewers, thumbnail generators, and office applications do not run SMIL and show only a still first frame; for documents and slides, export a video instead.
The file respects the viewer’s reduced-motion preference and does not animate when it is set. The validation warning triangles shown on the canvas are never included.
On a website, you can control an inlined animated SVG from JavaScript: play, pause, scrub, and step through states. See Scripting animated SVGs in the developer guide for the control API and recipes.
Video export
Section titled “Video export”To export a video:
- In the animation toolbar, click Export > Video…. The Export Video dialog opens.
- Set the options (see the table below). The dialog shows which encoder it will use.
- Click Export Video, or press Enter. A progress bar tracks the frames. To stop, click Abort.

Molkit renders the video frame by frame from the same animation it writes for the animated SVG, so the video matches the SVG. Press Esc to close the dialog.
| Option | Effect |
|---|---|
| Filename | The extension follows your format choice. Your settings are kept between exports. |
| Format | MP4 (H.264, plays almost everywhere) or WebM (VP8, faster to encode). WebM is unavailable if your browser cannot encode it. |
| Resolution | Match SVG, 720p, 1080p (default), 1440p, or 4K. The Output line shows the dimensions. |
| Frame Rate | 24, 30 (default), or 60 fps, with the number of frames shown. |
| Loops | Plays the animation once, or 2, 3, 5, 10, or 20 times. Video files do not loop by themselves, so set the repeats here if you need them. |
| Background | A solid color behind the animation. Videos have no transparency. |
| Quality | Extreme, High, Medium (default), or Standard. The three higher presets also offer Supersampling (2×), on by default, which renders frames at double resolution and scales them down for sharper lines; the export takes longer. |
Browser support for video
Section titled “Browser support for video”The fastest encoder is WebCodecs with hardware acceleration: H.264 for MP4 (Chrome and Edge) and VP8 for WebM (Chrome, Edge, and recent Firefox). In a browser without WebCodecs:
- MP4 uses a WebAssembly H.264 encoder: about 1 MB, downloaded once, and run in the background. It cannot encode resolutions above 4K, so use Chrome or Edge for very large exports.
- WebM uses the browser’s MediaRecorder, which encodes in roughly real time. Keep the tab active during the export; the dialog shows a warning when this applies.
LaTeX solution animations
Section titled “LaTeX solution animations”LaTeX solution animations export to video through the same dialog, with the same options. With one active, Export > Video… builds the same animation that the Export LaTeX Animation dialog saves and steps through it frame by frame, so the video shows every line, term move, and the boxed answer at the same timing.
- The equation sits centered on a 16:9 frame, and the math is drawn in dark ink.
- Each loop plays the animation once, with no fade between loops.
- The export needs a browser with the Web Animations API (current Chrome, Edge, Firefox, and Safari all have it). In a browser without it, Molkit shows an error message instead of saving a blank video.