YouTube Chapter Generator

YouTube Embed Code Generator

Build the iframe code for any YouTube video. Start/end time, autoplay, loop, responsive sizing — toggle and copy.

YouTube embed parameters cheat sheet

Every option in the tool above corresponds to a query parameter on the embed URL. Here's the full reference:

https://www.youtube.com/embed/VIDEO_ID
  ?start=SECONDS         // play start position
  &end=SECONDS           // play end position
  &autoplay=1            // start playing immediately
  &mute=1                // required for autoplay in modern browsers
  &loop=1&playlist=ID    // restart at end (playlist must equal the video ID)
  &controls=0            // hide playback controls
  &modestbranding=1      // smaller YouTube logo
  &rel=0                 // don't show related videos at the end
  &cc_load_policy=1      // force captions on
  &iv_load_policy=3      // hide video annotations
  &color=white           // progress bar color (white | red)

Responsive embed (16:9)

The classic CSS hack: wrap the iframe in a div with padding-bottom: 56.25% (which is 9/16 expressed as a percentage), set the iframe to absolute fill. The container now scales fluidly with its parent width, keeping the 16:9 aspect ratio:

<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;">
  <iframe
    style="position:absolute;top:0;left:0;width:100%;height:100%;"
    src="https://www.youtube.com/embed/VIDEO_ID"
    allowfullscreen></iframe>
</div>

The Responsive toggle in the tool generates this automatically.

Embedding a single moment

Set both start and end to embed only the part of the video that matters. Example: a 6-second loop of a key moment of a podcast, autoplaying and muted. Combined with loop=1, you get a custom video clip without re-uploading. See also our timestamp link generator for the share-link version of this.

FAQ

How do I embed a YouTube video on my website?
Paste the YouTube URL into the box above, choose your options (size, autoplay, start time, etc.), copy the generated iframe code, and paste it into your website's HTML wherever you want the video to appear.
Can I make a YouTube embed responsive?
Yes. Toggle the Responsive option in the tool — it wraps the iframe in a div with padding-bottom: 56.25% (16:9 ratio) so the video scales fluidly with its container width.
Why doesn't my YouTube embed autoplay?
Modern browsers block autoplay unless the video is muted. Our tool automatically adds mute=1 when autoplay=1 is set so the autoplay actually works.
Can I make a YouTube embed start at a specific time?
Yes. Set the start hours/minutes/seconds in the tool. The tool adds start=SECONDS to the embed URL. You can also set an end time so the video stops there.
Can I loop a YouTube embed?
Yes — toggle Loop. The tool adds loop=1 and the required playlist=VIDEO_ID parameter so the video restarts at the end.
What are the YouTube embed parameters?
The most useful: start (seconds), end (seconds), autoplay (0/1), mute (0/1), loop (0/1), controls (0/1), modestbranding (1). All go after the embed URL as query parameters.