Skip to main content
TheToolZip
Language:English

Video Embed Code Generator

Make the code to show your own video on a web page, with the options you want and a poster image taken from the video.

Calculated on your device

Choose the video to fill in its size and make a poster image. It isn't uploaded.

Where the video will be on your website, e.g. videos/intro.mp4 or a full https:// link.

The picture shown before the video plays.

Size on the page

Browsers only start videos automatically when they are muted, so autoplay also mutes the video.

How to make video embed code

  1. 1Optionally choose your video file. Its size fills in automatically, and a poster image is made from it.
  2. 2Enter where the video will be on your website, and choose the options you want.
  3. 3Copy the code and paste it into your page. Upload the video (and the poster image) to your website too.

About the code

The code uses the HTML video element, which every modern browser plays without plugins. MP4 with H.264 video plays everywhere, so it's the safest format for websites. Convert other formats first if needed.

The width and height tell the browser the video's shape before it loads, so the page doesn't jump. With "Fill the available width", the video shrinks to fit phones and grows on large screens. Browsers only autoplay muted videos, so turning on autoplay also mutes the video and lets it play inside the page on iPhones.

What you type stays private

This calculator works entirely in your browser. Nothing you enter is sent to a server, not even to us.Read our privacy policy

Frequently asked questions

Does this host my video?

No. The code points to the video's address on your website, so upload the video file there. This tool only writes the code and makes the poster image, without uploading anything.

Why doesn't my autoplay video play with sound?

Browsers block sound on videos that start by themselves. Visitors can turn the sound on with the controls.

Can I use this code for YouTube videos?

No. YouTube videos need the embed code from YouTube's Share button. This code is for video files you host yourself.

Is what I type sent anywhere?

No. The calculation happens in your web browser, on your own device. Nothing you enter is sent to us or anyone else.

Is it free?

Yes. There is no sign-up and no limit on how often you use it.

Does it work on my phone?

Yes. It works in any modern browser on Android, iPhone, iPad, Windows, Mac and Linux.