Decode · Play · Encode

Base64 to Video
Converter

Decode any Base64 string to a playable video file. Watch it directly in your browser, download it, inspect metadata, or encode video files back to Base64 all privately, zero server contact.

Format: auto-detected from data URI
Base64 Input0 chars
🎬

Video preview will appear here

🎬

Video Ready Codec Not Supported

The video was decoded successfully but your browser cannot play this format directly. Click Download to save the file and open it in a media player like VLC.

MP4 Size: Duration: Dimensions:
8
Video Formats
50MB
Max Encode Size
0ms
Server Latency
100%
Private & Secure

Decode Base64 Video in Three Steps

No account, no server uploads. Paste, play, and download in seconds.

1

Paste Base64 or Data URI

Copy your Base64 video string and paste it into the input. The tool accepts raw Base64 or a full data:video/…;base64,… data URI the MIME type is auto-detected from the prefix.

2

Select Format & Decode

Select the video format (MP4, WebM, OGG…) or let it auto-detect. Click "Decode & Play" to convert Base64 back to binary bytes, create a Blob, and load it into the HTML5 video player.

3

Play, Download or Copy

Watch the video directly in the browser. Download it as the original file format, copy the data URI, or open it full-screen in a new tab. The Data URI Builder tab helps assemble or strip URIs.

A Complete Base64 Video Toolkit

Play, download, encode, and build data URIs all in one private browser tool.

🎬

In-Browser Video Player

Decoded video loads directly into the native HTML5 player with full controls play, pause, scrub, volume, fullscreen. Duration and pixel dimensions are read from the video metadata automatically.

🔄

Two-Way Conversion

Decode Base64 to video and encode any video file to Base64. Drag-and-drop or browse a file to generate its Base64 string and complete data URI with a preview player in the encode tab.

🔗

Data URI Builder

Build a complete data:video/…;base64,… URI from a raw Base64 string and MIME type, or strip an existing data URI back to raw Base64 useful for embedding video directly in HTML.

📐

Video Metadata

After decoding, the info bar shows the detected format, file size, playback duration, and native pixel dimensions (width × height) extracted live from the video element's metadata event.

One-Click Download

Save the decoded video with a single click as a proper file with the correct extension no manual file reconstruction or hex editing required. Works for any browser-supported codec.

🔒

100% Private

All encoding and decoding runs locally using atob(), Blob, and URL.createObjectURL(). Video data never leaves your device safe for unreleased footage, private clips, and proprietary media assets.

Video Format Reference

MIME types, file extensions, codecs, and browser playback support for all recognised formats.

MIME TypeExtensionCommon CodecsBrowser PlaybackBest For
🎬video/mp4.mp4H.264, H.265/HEVC, AACUniversalWeb delivery, streaming, downloads
🌐video/webm.webmVP8, VP9, AV1, OpusChrome, Firefox, EdgeWeb-optimised, open-source codec
🎞️video/ogg.ogvTheora, VorbisFirefox, ChromeOpen-source, legacy compatibility
📹video/avi.aviDivX, XviD, MPEG-4LimitedLegacy Windows recordings
🎥video/quicktime.movH.264, ProRes, HEVCSafari, ChromeApple / macOS / iOS recordings
📦video/x-matroska.mkvH.264, H.265, VP9, AV1LimitedHigh-quality archival, subtitles
📺video/x-flv.flvH.263, Sorenson SparkDeprecatedLegacy Flash streaming
📱video/3gpp.3gpH.263, H.264, AACMobile browsersMobile video, legacy phones

When You Need Base64 Video

Base64-encoded video appears across APIs, embedded systems, and modern web development pipelines.

01

API Response Inspection

Computer vision APIs, video processing services, and media CDNs sometimes return short video clips or thumbnails as Base64 in JSON responses. Decode and preview them here instantly without writing any code.

02

Embedded HTML Video

Small looping clips, animated UI elements, or offline-capable video can be embedded directly in HTML using a data URI in the <video src="…"> attribute. Encode your video and copy the ready-to-use data URI.

03

WebSocket & WebRTC Debugging

Real-time video streams transported over WebSockets or data channels are often chunked as Base64. Decode individual frames or short segments to inspect the content mid-stream during protocol debugging.

04

IoT & Edge Device Video

Security cameras, dashcams, and embedded devices frequently transmit short video clips as Base64 over MQTT or HTTP APIs. Decode the payload here to verify the recording looks correct before processing it further.

05

Email & MIME Attachments

MIME email messages encode all binary attachments including video files as Base64. Extract the Base64 payload from a raw .eml file and decode it here to recover the original video attachment.

06

Progressive Web App Caching

PWAs and service workers sometimes cache video content as Base64 in IndexedDB for offline playback. Decode cached values here to verify the stored media is intact and plays correctly before releasing an update.

Base64 Video Decoding Explained

Video files are binary data sequences of bytes containing codec information, keyframes, audio tracks, and container metadata. Base64 encodes this binary data as printable ASCII by converting every 3 bytes into 4 characters, enabling video to be safely embedded in JSON payloads, HTML attributes, or email bodies.

To decode, the tool reverses the process: atob() converts the Base64 string to a raw binary string, which is then converted to a Uint8Array byte array. This is wrapped in a Blob with the correct video MIME type and converted to an object URL via URL.createObjectURL().

The resulting URL is set as the src of an HTML5 <video> element. The browser's native media engine handles decoding and playback no JavaScript video library is needed. Duration and dimensions are read from the loadedmetadata event.

// Decode Base64 → HTML5 video
 
function b64ToVideo(b64, mime) {
  // 1. Base64 → binary string
  const raw = atob(b64);
 
  // 2. Binary → Uint8Array
  const bytes = Uint8Array.from(
    raw, c => c.charCodeAt(0));
 
  // 3. Bytes → Blob with MIME type
  const blob = new Blob(
    [bytes], { type: mime });
 
  // 4. Blob → Object URL → src
  const url =
    URL.createObjectURL(blob);
  videoEl.src = url;
 
  // 5. Read metadata on load
  videoEl.onloadedmetadata = () => {
    console.log(videoEl.duration);
  };
}

Frequently Asked Questions

Everything you need to know about Base64 video encoding and this tool.

Browser video playback depends on two things: container format support and codec support. MP4 with H.264 is the most widely supported combination across all major browsers. WebM (VP8/VP9) works well in Chrome, Firefox, and Edge. AVI, MKV, and FLV are not natively supported in most browsers the video will decode correctly and you can download it, but you'll need a desktop media player like VLC to play it.
No. All encoding and decoding uses native browser APIs: atob(), Blob, URL.createObjectURL(), and FileReader. Your video data never leaves your device. This makes the tool safe for private footage, unreleased content, and proprietary media assets.
The recommended maximum for the Video → Base64 encoder is 50 MB. Video files produce very large Base64 strings a 10 MB video generates roughly 13.3 MB of Base64 text due to the 33% overhead. Encoding is handled by FileReader.readAsDataURL() and runs entirely in memory. For files over 50 MB, the browser may become slow or unresponsive during encoding. There is no hard limit enforced, but be cautious with large files.
Base64 encodes every 3 bytes of binary data as 4 ASCII characters, producing output approximately 33% larger than the original. For a 10 MB video, the Base64 output is around 13.3 MB. This overhead is the cost of representing binary data in a text format safe for use in JSON, HTML attributes, and email bodies. For large video files, linking to a hosted URL is more efficient than embedding as Base64.
Yes, using a data URI as the video source: <video src="data:video/mp4;base64,AAAAI…"></video>. However, this is only practical for very short clips a few seconds at most. Long videos produce massive data URIs that increase HTML page weight significantly, hurt performance, and may exceed browser URI length limits. Use this technique for tiny animated assets, not full-length videos.
If you have a data URI, the MIME type is already in the prefix: data:video/mp4;base64,…. For raw Base64, the best clue is the source system or file extension. When in doubt, try MP4 first it's the most common format. If the video plays but has no audio, try WebM. If nothing works, download the decoded file and check its type with a tool like VLC or the file command on macOS/Linux.
The Data URI Builder helps with two tasks: (1) combining a raw Base64 string with a MIME type to produce a complete data:video/…;base64,… URI ready to paste into HTML or CSS; and (2) stripping an existing data URI back to just the raw Base64 payload useful when an API expects raw Base64 without the data URI prefix. You can also send any built URI directly to the player tab for instant preview.
MP4 with H.264 video and AAC audio has universal support across Chrome, Firefox, Safari, Edge, and all mobile browsers. WebM (VP9) is an excellent open-source alternative with broad support except in older Safari versions. OGG/Theora is supported in Firefox and Chrome but rarely used in modern production. AVI, MKV, MOV, and FLV have limited or no browser playback support and are best opened in a desktop media player after downloading.