Free tools, no sign-up — everything runs in your browser.
ToolHub 1000Free online tools

YouTube Embed Code Generator: Paste a Video Into Any Page

A watch link sends people away. An embed keeps the video where your readers already are.

What is the YouTube Embed Code Generator?

Embedding a video is mostly a matter of getting the iframe right, and this generator writes it for you. Paste a video ID or a watch link, choose a width and height, and it produces the standard YouTube embed snippet with fullscreen allowed. The result pastes directly into a page, a post editor that accepts HTML, or a template.

How to use it

  1. Paste a YouTube video link or video ID.
  2. Set the width and height you want.
  3. Click Generate Embed Code.
  4. Paste the iframe snippet into your page.

Worked example

Generating an embed for the sample video gives a 560 by 315 iframe pointing at its embed address.

How do I embed a YouTube video?

Use an iframe pointing at youtube.com/embed/VIDEO_ID with your chosen width and height and fullscreen allowed, then paste it into your page HTML.

Frequently asked questions

What size should I use?

560 by 315 is the classic 16:9 embed size. Scale both numbers together to keep the same shape at another size.

Does the snippet autoplay?

No. It loads the standard player, and viewers press play as usual.

Try the YouTube Embed Code Generator free · All guides