Free online tool · no sign-up
YouTube Embed Code Generator
The iframe code for any YouTube video, with the options YouTube's own Share button does not give you: responsive width, start and end time, autoplay, loop, no related videos, privacy-enhanced domain. Preview it, copy it, paste it.
- Responsive iframe
- Start, end, loop, autoplay
- Free, no sign-up

Preview
How to embed a YouTube video
- Paste the video link. The code appears at once and the preview below shows the result.
- Pick a size - Responsive fits any page width and is the right choice for almost every site - and the options you need.
- Press Copy embed code and paste it into your page's HTML, a WordPress "Custom HTML" block, Notion, Webflow or Shopify.
Embed parameters explained
| Parameter | What it does |
|---|---|
start / end | Start and stop at these seconds. |
autoplay=1 | Starts playing when the page loads - browsers allow it only muted. |
mute=1 | Starts silent. |
loop=1&playlist=ID | Repeats; YouTube needs the video id repeated in playlist for a single video. |
controls=0 | Hides the player bar. |
rel=0 | Shows related videos only from the same channel at the end. |
| youtube-nocookie.com | YouTube sets no tracking cookies until the visitor plays - better for GDPR banners. |
Loop, screenshot, transcript and skins for the YouTube playerFree extension · 40 000 users · works on Chromebook
Add to Chrome - it is freeFrequently asked questions
Why does autoplay not work?
Browsers block autoplay with sound. The generator adds mute=1 together with autoplay, which browsers allow.
How do I make the video responsive?
Choose Responsive: the iframe sits in a wrapper with a 56.25% padding (the 16:9 ratio) and fills whatever width the page gives it.
What is youtube-nocookie.com?
YouTube's privacy-enhanced embed domain: no cookies are stored until the visitor plays the video. Recommended for sites in the EU.
Can I embed a Shorts video?
Yes - paste the Shorts link; it embeds like any video, in a 16:9 frame.