Base64Doc

Encode MP4 Video Clips to Base64 Locally

100% Browser Local · 0 File Uploads · 100MB+ Ready

Stream .mp4 or .webm clips through a local Web Worker into RFC 4648 Base64 or HTML5 <video> Data URIs without uploading video to external servers.

Try 1-Click Synthetic Samples (Zero-Trademark):

Drop any file, paste Base64, or press Ctrl/Cmd+V with clipboard files or raw API JSON

Runs inside a local Web Worker. Network tab stays at 0 file POST requests.

0 chars
Encoded Base64, Gateway Budget & Code Snippets Appear Here

Drop any local file up to 100MB+ or type UTF-8 text on the left. No data leaves your browser.

Interactive Synthetic Showcase Gallery

Load real client-side verified payloads straight into the workbench above. Zero third-party trademarks.

Free · InstantCASE-1

Shipping API JSON -> 2 Auto-Named PDFs + 180 deg Label Fix

Input Payload
Raw Shipping API JSON (4.8 KB)
Verified Output
waybill_label.pdf (4x6 in, 180 deg -> 0 deg) + commercial_invoice.pdf (A4, 2 pages)
Real browser-decoded output preview (client-side only)
Free · InstantCASE-2

ERP Payload -> PK\x03\x04 Verified 3-Sheet Excel Preview

Input Payload
ERP Base64 Payload (122.8 KB)
Verified Output
Summary (128 rows x 11 cols), LineItems (48 rows), Tax (24 rows) -> .xlsx / .csv / .json
Real browser-decoded output preview (client-side only)
Free · InstantCASE-3

Broken Data URI + MIME Fix + White Transparent Logo

Input Payload
Broken data:image/jpeg;base64 + \/ + newlines (4.9 KB)
Verified Output
Auto-fixed to image/png (512x512 px) + Checkerboard reveals white emblem
Real browser-decoded output preview (client-side only)
Free · InstantCASE-4

Gzip + Base64 Unpack & Korean EUC-KR Mojibake Self-Heal

Input Payload
Gzipped Base64 (212 chars) + EUC-KR Receipt
Verified Output
Gunzipped JSON + EUC-KR Hangul receipt recovered from UTF-8 replacement chars
Real browser-decoded output preview (client-side only)
Free · InstantCASE-5

40-Page Contract Slimming + Gateway Green-Light Check

Input Payload
40-Page Synthetic Contract PDF (33.7 KB)
Verified Output
Extract Page 1 -> +33.3% Base64 fits comfortably under 4.5 MB Vercel limit
Real browser-decoded output preview (client-side only)

Understanding Gateway & Page-Weight Limits for Video Base64

Know immediately when a compact UI micro-clip fits safely inline vs when a multi-megabyte MP4 must move to CDN range streaming or R2 pre-signed URLs.

Read full technical details

Tiny silent MP4 loops (such as a 10–150 KB onboarding demo) occasionally ship inline for single-file offline bundles or isolated Playwright fixtures. Beyond a couple hundred kilobytes, however, Base64’s +33.33% size tax hurts page load and breaks HTTP range seeking.

When encoding video clips for API tests, Base64Doc computes the exact post-expansion byte footprint in real time—warning you in red the moment a 5 MB MP4 balloons to 6.67 MB past Vercel’s 4.5 MB and AWS REST’s 6 MB caps.

Web Worker Streaming Prevents Tab Freezes on Large Clips

Encode 50 MB–100 MB video fixtures locally without stalling browser tabs or filling textareas with tens of millions of characters.

Read full technical details

Reading a 60 MB MP4 into an uncontrolled textarea string crashes browser tabs instantly. Base64Doc processes aligned 786,432-byte slices inside a dedicated Web Worker and exposes head/tail excerpts plus streaming .txt Blob downloads.

MP4 ftyp vs WebM EBML Container Fingerprinting

Assign exact video/mp4 or video/webm MIME headers automatically by inspecting byte offsets 0..12.

Read full technical details

Checking the offset-4 ftyp brand box and EBML 1A 45 DF A3 signatures guarantees Data URIs carry valid media declarations without manual configuration.

Step-by-Step Local Workflow

STEP 1

Load a Local .mp4 or .webm Clip

Select any video clip from disk; File.slice() passes 786 KB aligned chunks to a local Web Worker without uploading video frames.

STEP 2

Verify ftyp / WebM Container Header

Base64Doc checks offset 4 for ISO Base Media ftyp atoms (video/mp4) or 1A 45 DF A3 (video/webm) to set exact Data URI headers.

STEP 3

Check +33.33% Payload Budget Warnings

Observe how fast video expands under Base64—a 5 MB MP4 reaches ~6.67 MB, turning both Vercel 4.5 MB and AWS 6 MB indicators red.

STEP 4

Copy Micro-Video Tag or Stream-Save .txt

Grab an HTML5 <video> Data URI for tiny offline UI loops, or stream-download the full Base64 .txt output cleanly.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
ISO BMFF Atom OffsetOffset 4: 66 74 79 70 (ftyp)Covers isom, mp42, avc1, and iso2 MP4 brand identifiers.
WebM Alternative1A 45 DF A3 (EBML / Matroska)Automatically emits video/webm when VP8/VP9/AV1 WebM files are dropped.
Gateway Ceiling Impact3.35 MB raw -> 4.47 MB Base64Only short micro-clips (< 3.3 MB) clear 4.5 MB JSON API gateways.
Worker Chunking786,432-byte aligned blocksPrevents tab crashes via 4,096-char head/tail preview virtualization.
Ideal Inline CaseMicro UI demos (< 150 KB)Production video streaming should always use HTTP Range CDN files.

Frequently Asked Questions

Why does Base64Doc warn me in red when encoding a 5 MB MP4 clip?

Adding +33.33% Base64 overhead expands a 5 MB MP4 to roughly 6.67 MB, exceeding both Vercel’s 4.5 MB and AWS REST API Gateway’s 6 MB request limits.

Does encoding an MP4 clip freeze my browser UI?

No, 786 KB Web Worker chunking keeps browser controls responsive and uses 4,096-char head/tail virtualization for multi-megabyte strings.

Why should production websites avoid embedding multi-megabyte MP4 Base64 in HTML?

Inline Data URIs cannot use HTTP 206 partial byte-range streaming, inflate HTML document weight by 33%, and block independent CDN video caching.

Does Base64Doc recognize WebM videos as well as MP4?

Yes, dropping a .webm clip detects the 1A 45 DF A3 EBML header and emits video/webm automatically.

Are raw video recordings uploaded anywhere during encoding?

No, every file slice is read and Base64-encoded strictly inside local browser memory.

Explore All 34 Base64 Converters & Developer Tools