Encode Video to Base64

The converter helps to encode Video file to Base64 data then to copy or download a result data in several formats. If you want decode use Base64 to 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 other);
  2. Press Encode button (you will see 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 roperty.
  • 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 Video file to my site (HTML page)

If you want add Video in web site, you should encode Video file and select formats: 

  • HTML Video Tag;
  • HTML Hyperlink Tag

Example HTML Video Tag:

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

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

If you want download 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>