Video to Base64 Encoder – Free

Convert a short video to Base64 text. The clip is read and encoded in your browser, limited to 20 MiB, and the result can be copied or saved as a text file.

How to use the Video to Base64 tool

  1. Select the File field and choose a clip. The picker is filtered to video files such as MP4, WebM and MOV.
  2. Select Encode file. Encoding a file near the size limit can take a few seconds.
  3. When the status reads Done, the Base64 string is in the Result box.
  4. Select Download to save the string as a .base64 text file. For large clips this is more reliable than Copy.

What video to Base64 conversion gives you

The tool reads the container file as bytes and writes them out as standard Base64 with padding, on one line. Video and audio tracks are not decoded, so resolution, codec and bitrate are untouched. The output carries no data: prefix and no file name.

Size is the main concern with video. Every three bytes become four characters, so the text is a third larger than the clip. At the 20 MiB limit (20,971,520 bytes) the result is 27,962,028 characters.

How long a clip can be

A file above 20 MiB is rejected with Choose a file up to 20 MiB. Duration at that size depends on the total bitrate. If your clip is too large, lower the resolution or bitrate with a video encoder first, or trim it.

  • 5 Mbit/s, common for 1080p: about 33 seconds.
  • 2.5 Mbit/s, common for 720p: about 67 seconds.
  • 1 Mbit/s, a compressed 480p clip: about 2 minutes 48 seconds.
  • 500 kbit/s, a small preview loop: about 5 minutes 35 seconds.

Worked example: the start of an MP4

MP4 files open with an ftyp box. A file consisting of only that 24 byte box encodes to the 32 characters below. Real clips are far longer, but they begin the same way: AAAA, a character that reflects the box length, then GZ0eX. WebM files begin with GkXfo. Those prefixes let you recognize video data in a log or database column.

clip.mp4 (24 bytes: one ftyp box, brand mp42)

AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQy

Download name:  clip.mp4.base64

Should you embed video as Base64

Rarely in production pages. A data:video/mp4;base64, URL works as the src of a video element, but the browser must load the entire string before it can play. There are no range requests, so no streaming and no seeking ahead of the download, and the clip is fetched again whenever the surrounding document is.

Base64 video does make sense for multimodal or media analysis APIs that take inline data in JSON, for self-contained HTML demos and bug reports, for short looping animations in offline documentation, and for test fixtures. Check the request size limit of the receiving API first, since the encoded form is a third larger than the file.

Frequently asked questions

Is the video uploaded during encoding?

No. Your browser reads the clip from disk and encodes it in memory. There is no upload step, so there is also no waiting on your connection speed.

What is the maximum video size?

20 MiB per file. That is roughly half a minute of 1080p footage at 5 Mbit/s. Larger files produce the message Choose a file up to 20 MiB and are not read.

Which video formats are supported?

All of them, because the encoder never looks inside the file. The picker filters for video types, typically MP4, WebM, MOV, MKV and AVI, and the bytes are encoded exactly as stored.

Why does the page slow down after encoding?

A long result means millions of characters in the Result box. Rendering and copying that much text is heavy for any browser. Use the Download link to save the string to a file instead of selecting it.

How do I turn the Base64 back into a video?

Paste the string into Base64 to Video. It recognizes MP4 and WebM containers, plays the clip in the page and saves it as decoded.mp4 or decoded.webm.

Can I use the output in a video tag?

Yes, after adding a prefix. Combine data:video/mp4;base64, with the string for an MP4, or data:video/webm;base64, for WebM, and set the result as the src attribute.

Related tools