Encode Video to Base64

The converter helps to encode the Video file to Base64 data and then copy or download the result data in several formats. If you want to decode, use Base64 for Video Decoder.

How to encode Video file to Base64 Data

  1. Select or drag & drop one or several Video files (MPG, AVI, OGV, WEBV, and others);
  2. Press Encode button (you will see the result below);
  3. Select output format (Plain Text, Data URL, HTML Video Tag, Embed Tag, HTML Iframe Tag, HTML Hyperlink Tag);
  4. Copy or Download Base64 data;
  5. Done!

Output Formats

  • Plain Text - Only Base64 data;
  • Data Url - Base64 in data URL format (data:[<MIME-type>][;charset=<encoding>][;base64],<base64 data>)
  • HTML Video Tag - HTML Tag <video> with Data Url data in SOURCE.SRC property.
  • HTML Hyperlink Tag - HTML Tag <a> with Data Url data in HREF property.
  • HTML IFarme Tag - HTML Tag <iframe> with Data Url data in SRC property
  • HTML Embed Tag - HTML Tag <embed> with Data Url data in SRC property.

Output Format Examples for Video (truncated data for example)

Plain Text:


Data Url:


HTML Video Tag

<video controls><source src="video/mpeg;base64,AAABuiEAAQALgBexAAABuwAMgBexBeH/wMAg4ODgAAA..."></video>

HTML Hyperlink Tag:

<a href="data:video/mpeg;base64,AAABuiEAAQALgBexAAABuwAMgBexBeH/wMAg4ODgAAA...">Click</a>

HTML IFrame Tag:

<iframe src="data:video/mpeg;base64,AAABuiEAAQALgBexAAABuwAMgBexBeH/wMAg4ODgAAA..."></iframe>

HTML Embed Tag

<embed src="data:video/mpeg;base64,AAABuiEAAQALgBexAAABuwAMgBexBeH/wMAg4ODgAAA..."></embed>

How to add a Video file to my site (HTML page)

If you want to add Video to the website, you should encode the Video file and select the forms: 

  • HTML Video Tag;
  • HTML Hyperlink Tag

Example HTML Video Tag:

<video controls><source src="data:video/mpeg;base64,AAABuiEAAQALgBexAAABuwAMgBexBeH/wMAg4ODgAAA..."></video>

Copy and Paste this code to your web page's <body> tag. You can set additional <video> tags. More info about video tag.

If you want to download an Audio file by HTML Hyperlink Tag, add attribute download="<file-name>.<extension>"

<a href="data:video/mpeg;base64,AAABuiEAAQALgBexAAABuwAMgBexBeH/wMAg4ODgAAA..." download="video.mpg">Download Video File</a>