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
- Paste a YouTube video link or video ID.
- Set the width and height you want.
- Click Generate Embed Code.
- 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.