YouTube embed code with the options you need
Paste a video link and get iframe code that starts and ends where you want, autoplays muted, loops, shows captions or hides controls, in a responsive 16:9 box that fits any page.
Paste the code into an HTML block in WordPress, Shopify, Webflow, Squarespace or any page. The preview loads YouTube's player from YouTube.
To embed a YouTube video with options, paste its link here, set a start or end time and tick the options you want, then copy the code into an HTML block on your site. The tool adds YouTube's player parameters: start and end in seconds, autoplay (which browsers only allow when muted, so it also adds mute=1), loop (which needs the playlist parameter set to the same video), controls=0 to hide controls and cc_load_policy=1 for captions. Privacy-enhanced mode uses youtube-nocookie.com.
3 steps, a few seconds
Paste the video link
A watch, youtu.be, Shorts or embed link. A ?t= time becomes the start time.
Choose options
Start and end, size, autoplay, loop, controls, captions and privacy mode.
Copy the code
Paste it into an HTML or embed block on your site. Preview it here first if you like.
What the YouTube Embed Code Generator does
Start and end times
Play only the part that matters, in m:ss or YouTube's 1m30s format.
Responsive 16:9
A wrapper that scales with the page, or a fixed 560, 640 or 853 wide player.
Autoplay and loop
Set up the way browsers allow: autoplay muted, loop with the playlist parameter.
Privacy-enhanced mode
Uses youtube-nocookie.com, YouTube's privacy-enhanced embed domain.
Captions on
Shows captions by default when the video has them.
Clean code
Only the parameters you change, plus lazy loading and a title for accessibility.
- Parameters
- start, end, autoplay + mute, loop + playlist, controls, cc_load_policy, playsinline
- Sizes
- Responsive 16:9, 560×315, 640×360, 853×480, Shorts 315×560
- Privacy
- Optional youtube-nocookie.com domain
- Preview
- Loads YouTube's player only when you press Show preview
- Cost
- Free, no sign-up
Need more than a free tool?
QuickVeed's AI studio does the heavy lifting. New accounts get a 14-day trial with 75 credits, no card needed.
Questions about the YouTube Embed Code Generator
How do I embed a YouTube video at a specific time?
Why doesn't my embedded video autoplay with sound?
How do I make a YouTube embed responsive?
What is privacy-enhanced mode?
How do I loop a YouTube embed?
Link to this tool
Found it useful? Paste this into your blog, docs or resource page so others can find it.