YouTube Embed Code Generator
Create responsive embed code with autoplay, loop and more.
Free
Runs in your browser
About this tool
This generator builds the HTML you need to put a YouTube video on your website. It is responsive, so the video scales on mobile, and you can turn on options like autoplay, loop and privacy-enhanced mode.
How to use YouTube Embed Code Generator
- Paste the YouTube link.
- Tick the options you want and set a start time.
- Copy the code and paste it into your page.
Questions people ask
Why does autoplay not work?
Browsers block autoplay with sound. Turn on “Mute” together with autoplay and it will start on its own.
What is privacy-enhanced mode?
It uses youtube-nocookie.com, so YouTube does not store cookies for visitors until they play the video.
How do I make the embed responsive?
The generated code wraps the iframe in a container with a 16:9 aspect ratio, so it resizes with the page.
More youtube tools
See all 10 →
YouTube Title & Description CheckerCheck titles and descriptions against YouTube limits.
YouTube Hashtag GeneratorBuild YouTube hashtags from your own keywords.
YouTube Tag GeneratorMake a tag list that fits YouTube’s 500 limit.
YouTube Thumbnail PreviewSee your thumbnail in a mock YouTube feed.
YouTube Description TemplateBuild a description with timestamps and links.
YouTube Money CalculatorEstimate YouTube earnings from views and RPM.