How to use
- Enter the video link (or the 11-character ID). watch, shorts and youtu.be links all work.
- If you need it, add a start time and an end time as
1:23,90or1m30s. - Choose player options such as autoplay, loop or hidden controls, then pick a size.
- Copy the iframe code shown below and paste it into your blog’s HTML editor or your site source.
This tool only generates code and does not load the video on this page. Play it on the page where you paste it to confirm.
Options and the URL values they create
| Option | Value added to the URL | Notes |
|---|---|---|
| Start time | start=83 |
In seconds. 1 min 23 s is 83 |
| End time | end=150 |
Applied only when larger than the start |
| Autoplay | autoplay=1 |
Browsers often block autoplay with sound, so pair it with mute |
| Start muted | mute=1 |
Use together with autoplay |
| Hide controls | controls=0 |
Hides the progress bar and buttons |
| Loop | loop=1&playlist=VIDEO_ID |
To loop one video, playlist needs the same ID |
| Same-channel related | rel=0 |
Limits end-of-video suggestions to the same channel (does not remove them) |
| Captions on | cc_load_policy=1 |
Starts with captions on for videos that have them |
| No fullscreen | fs=0 |
Removes the fullscreen button (allowfullscreen is dropped too) |
| No keyboard | disablekb=1 |
Disables keyboard shortcuts |
| Mobile inline | playsinline=1 |
Plays inside the page on phones instead of jumping to fullscreen |
| Language | hl=en |
Language of the player menus |
With a start of 83 seconds and an end of 150 seconds the address becomes https://www.youtube.com/embed/VIDEO_ID?start=83&end=150. Inside an HTML attribute the correct way to write & is &, so the generated iframe code does that. The “Embed URL” box below copies with a plain &.
Size and responsive layout
Pick a fixed size from 560×315 (default), 640×360, 853×480, 1280×720 or the vertical 315×560, or type your own. Turning on “Stretch to container width” replaces the width and height attributes with style="width:100%;aspect-ratio:16/9;border:0", so the player follows its parent’s width and keeps 16:9. Responsive is the better choice to avoid overflow on mobile.
Privacy mode and accessibility
- “Privacy-enhanced mode” switches the domain to
youtube-nocookie.com. YouTube describes this mode as not storing cookies for the viewer until they play the video. - The iframe
titleis the description screen readers announce. If you leave it empty it falls back to “Video player”, so use the video’s title. - “Load when near the viewport” adds
loading="lazy", so a video far down the page is not loaded until you scroll toward it.
Frequently asked questions
Autoplay does not start.
Browsers often block autoplay for videos with sound. A snippet with both autoplay and mute turned on works in most browsers.
How do I loop a single video?
With loop turned on, the code includes loop=1 and the same video ID in playlist. YouTube’s loop feature needs this form even for one video.
Can I stop related videos from appearing?
rel=0 only limits suggestions to videos from the same channel; it does not remove them. There is no option to remove them entirely.
I pasted it into my blog but nothing shows.
Whether iframes are allowed differs by service. Where HTML editing is blocked, paste just the video link or use that service’s own video embed feature.
Can I embed a private video?
A private video plays only for accounts that have permission, once logged in. To show it to ordinary visitors, set it to public or unlisted.
Related tools
If you only need a plain link that starts at a given time, use YouTube Timestamp Link. To handle special characters in code by hand, see the HTML Entity Converter, and to set the preview that appears when a page is shared, use the Meta Tag Generator.
The link you enter is processed only in your browser and is never sent to a server.