Home / Free Tools / YouTube Embed Code Generator
YouTube Embed Code Generator
Paste a YouTube link and get iframe code you can drop into any website, blog or WordPress page. Choose a start or end time, autoplay, loop, hidden controls and privacy-enhanced mode, and see a live preview.
That doesn’t look like a YouTube video link.
Preview
How to use the YouTube Embed Code Generator
- Paste the YouTube video URL.
- Pick the options you want, such as a start time or responsive size.
- Check the preview below the code.
- Copy the code and paste it into the HTML of your page.
What the options do
- Responsive size fills the width of its container and keeps a 16:9 shape on phones.
- Privacy-enhanced mode uses youtube-nocookie.com, which avoids storing viewer information until they play the video.
- Autoplay only works when the video starts muted, because browsers block autoplay with sound.
- Loop repeats a single video by adding it as its own playlist.
Embedding is the right way to share
Embedding plays the video from YouTube itself, so the creator keeps the views and any ad revenue. If the owner has turned off embedding for a video, the player will show a message instead.
Frequently asked questions
Is embedding YouTube videos allowed?
Yes, YouTube offers embedding for most videos. Some owners disable it, and then the embed will not play.
Why doesn’t autoplay work?
Browsers only allow autoplay when the video is muted. The tool turns on mute automatically when you choose autoplay.
Can I embed a Short?
Yes. Paste the Shorts link and the tool converts it to the standard embed format.