HTML to Video Converter
Convert HTML with CSS animations into a downloadable MP4 video — rendered frame-by-frame entirely in your browser.
HTML input
Live preview
Full 1920 × 1080 frame, scaled to fit — vertical and square formats letterbox automatically.
Export settings
Auto trims the empty space around your content. Select area lets you draw exactly what to record — the selection expands to the output aspect ratio so nothing distorts.
150 frames will be rendered (5s × 30fps) and encoded to H.264 MP4 — all locally in your browser.
Good to know
- CSS keyframe animations are captured frame-perfectly in CSS mode. JavaScript/React apps are captured in JavaScript mode via a virtual clock that steps
requestAnimationFrame,performance.now, and timers one frame at a time. - External resources (remote images, web fonts, stylesheets) cannot load during rasterization — inline your CSS and embed images as
data:URIs. System fonts work fine (Google-Font imports fall back to system fonts in the export). - JavaScript mode captures the rendered DOM —
<canvas>,<video>, and audio content are not included. - Pick the Reels / Shorts preset (1080 × 1920) for Instagram Reels, YouTube Shorts, and TikTok — all three use the same 9:16 format.
- Mobile layoutrenders your page at a real phone viewport width of your choice (responsive media queries apply, just like a phone browser) and captures the full page height — the page is scaled to fit the export resolution, letterboxed when the aspect ratio differs, so nothing gets cut off. Combine with “Crop to content” to zoom in on the content instead.
- Crop — Auto measures where your content actually is before recording and captures just that region (plus a small margin); Select area records exactly the rectangle you draw on the preview. Both are expanded to the output aspect ratio. Auto measures the initial frame, so animations that travel far outside their starting position may leave the crop.
What does HTML to Video do?
This tool takes an HTML/CSS snippet — typically one with a CSS animation or transition — and renders it frame by frame into an actual MP4 video file. It works by stepping the animation forward in fixed time increments (say, 1/30th of a second for 30fps), capturing each frame's rendered output, and feeding that sequence into the browser's WebCodecs API to encode a real video stream, rather than recording your screen or relying on a screen-capture API.
Because it renders frame-by-frame rather than capturing in real time, the output is frame-perfect regardless of your machine's actual performance while rendering — a complex animation that would stutter if screen-recorded in real time still exports as a smooth, consistent video, since each frame gets as long as it needs to render before being captured.
When to use it
Use it to turn a CSS loading spinner, an animated logo reveal, a UI micro-interaction, or a data visualization built in HTML/CSS into a video file you can embed where CSS animations won't play — a slide deck, a video editor timeline, a platform that only accepts video uploads, or a GIF-replacement in contexts that need actual video (smaller file size, better compression than GIF, and audio support if you ever add it).
It's also useful for design QA: exporting an animation as video gives you a frame-accurate artifact you can scrub through and compare against a spec, rather than relying on eyeballing the live CSS animation in a browser tab.
Example
Write a 2-second CSS keyframe animation of a logo fading and scaling in, set the export to 1080×1080 at 30fps, and run the conversion — the tool steps through 60 frames, capturing each one, and encodes them into an MP4 roughly 2 seconds long via WebCodecs. The output downloads directly as a video file with no watermark, ready to drop into a slide or upload to a platform that doesn't support embedded HTML/CSS.
How to use the HTML to Video Converter tool
- 1
Add your HTML
Paste HTML with CSS animations into the editor, or upload an .html file. A live preview shows exactly what will be recorded.
- 2
Choose export settings
Set the video duration (up to 5 minutes), frame rate (24/30/60 fps), and resolution (720p, 1080p, square, or vertical).
- 3
Render the video
Click "Render video". Every frame is rasterized and encoded to H.264 MP4 in your browser — usually faster than real time.
- 4
Download your MP4
Preview the result, then click "Download MP4" to save the video. Nothing is uploaded to any server.
Frequently asked questions
Is the HTML to Video converter really 100% client-side?
Yes. Your HTML is rendered, rasterized frame-by-frame, and encoded to MP4 entirely in your browser using the WebCodecs API. Nothing is uploaded to a server, and the tool works offline once the page is loaded.
What video format do I get?
You get a standard MP4 file with H.264 video, which plays everywhere — phones, social media, video editors, PowerPoint, and messaging apps.
How long can the video be?
Up to 5 minutes. Because rendering is frame-by-frame (not a real-time screen recording), the export usually completes faster than the video duration and every frame is captured perfectly, even on slower machines.
Which animations are supported?
CSS keyframe animations (@keyframes) are captured frame-perfectly, including transforms, opacity, colors, and gradients. JavaScript-driven animations (requestAnimationFrame, GSAP, Web Animations API) are not captured and will appear frozen at their initial state.
Why do my images or fonts not appear in the video?
For security, the browser blocks external network requests during rasterization. Embed images as data: URIs and use system fonts or inline your font as a base64 data: URI inside a @font-face rule.
Which browsers are supported?
Any browser with the WebCodecs API: Chrome, Edge, Safari, and recent Firefox versions. If your browser is unsupported, the tool will tell you before you start.
Related Export Tools
Markdown Preview with Split Pane and Shareable Link
Render Markdown as a shareable preview page
Code to Image
Convert code snippets to beautiful images via canvas
JSON Visual Tree
Visualize JSON data as an interactive tree
Text to File
Download text as .txt, .md, or .json files
OG Image Generator
Generate Open Graph images using Satori in Next.js
Get the next tool before you need it
One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

