YouTube Embed Code Generator
Embed any YouTube video, your way.
Paste a URL, customize autoplay / timestamps / controls / theme, and copy the iframe code. Free, browser-based, no signup. Every option YouTube’s player supports is here.
Paste a YouTube URL above to start.
1
Paste the YouTube URL
Any youtube.com/watch?v=… or youtu.be/… link works. The tool extracts the video ID automatically.
2
Pick your options
Autoplay, mute, start/end timestamps, hide controls, hide related videos, privacy mode, theme — every common iframe parameter is here.
3
Copy the generated code
The iframe code updates live as you change options. Click Copy, paste into your HTML / CMS / blog editor.
What each option does
| Option | What it does |
|---|---|
| Autoplay | Starts playback as soon as the page loads. Browser autoplay policies block unmuted autoplay — combine with Mute for reliable behavior. |
| Mute | Starts the video with sound off. Required for autoplay to work in Chrome/Safari. |
| Start time | Begin playback at a specific second. Useful for embedding “the relevant part” of a long video. |
| End time | Stop playback at a specific second. Pair with start time to embed a clip. |
| Hide controls | Removes the player UI (progress bar, time, settings). The video is still clickable to play/pause but viewers can’t scrub. |
| Hide related videos | When the video ends, don’t show the “up next” grid. Keeps viewers on your page. |
| Loop | Restart the video automatically when it ends. Useful for background-video aesthetics. |
| Privacy mode | Uses youtube-nocookie.com — no tracking cookies until the viewer presses play. GDPR-friendly. |
| Theme | Light or dark player theme. Match your site’s color scheme. |
Frequently asked questions
Is this free?
Yes. The generator runs entirely in your browser — no signup, no rate limits, no usage tracking. The code it produces is a standard YouTube iframe embed; you can copy it as many times as you want.
Will the embedded video play with autoplay?
It depends on the viewer's browser. Chrome and Safari block unmuted autoplay across the board (browser-level policy that overrides any iframe parameter). If you set both autoplay=1 and mute=1 in the embed, autoplay works everywhere — but the video starts silent. Without mute, it starts paused on most browsers.
What's the difference between youtube.com/embed and youtube-nocookie.com/embed?
youtube-nocookie.com is YouTube's privacy-enhanced embed mode. It doesn't set tracking cookies on the viewer's browser until they actually start playing the video. Recommended for sites that need to be GDPR-friendly. The toggle is included as the "Privacy mode" option.
Can I embed a YouTube playlist?
Yes, but you'd construct a different URL: `youtube.com/embed/videoseries?list=PLAYLIST_ID`. This tool is single-video focused; for playlists, paste your first video's URL and manually edit the resulting code's path to /embed/videoseries?list=...
Does the start/end time work for live streams?
Partial. Start time on a live stream is treated as "start from this point in the recorded portion". End time on a live stream is ignored. For VOD videos both work as expected.
Will I get a download instead of an embed?
No — this tool generates iframe code that loads YouTube's player on your page. For downloads, use our main video downloader at /youtube-downloader.
Is the embed code safe to paste into my CMS?
Yes, it's standard iframe HTML. WordPress, Ghost, Squarespace, Webflow, and most CMSes accept iframe embeds directly. Some block iframes in the basic editor and require switching to HTML / "raw" mode.