Every YouTube embed parameter, and the ones that stopped working
A reference for the settings on a YouTube embed URL: what the player still honours and what it quietly ignores.
8 minute readAssumes you write code
A YouTube embed is an iframe pointed at youtube.com/embed/VIDEO_ID, and everything you can change about it is a query parameter on that URL. The list below is what the player actually honours. The interesting part is the second half: several parameters that are still copied around the web do nothing at all any more, and the player ignores them without complaint.
The URL you are building
<iframe
src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?rel=0&start=30"
title="A description of the video"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen></iframe>Two things there are not parameters and are worth getting right anyway. Thetitle attribute is the accessible name of the frame, and a screen reader announces it in place of the video, so"Quarterly product update" beats "YouTube video player". And youtube-nocookie.com is a real alternative host, not a parameter: it serves the same player but sets no tracking cookie until somebody presses play, which usually keeps the embed out of your consent banner entirely.
Parameters that work
| Parameter | Values | What it does |
|---|---|---|
autoplay | 0, 1 | Starts on load. Needs mute=1 to work at all. |
mute | 0, 1 | Starts silent. The unlock for autoplay. |
controls | 0, 1 | Hides the player chrome during playback. See the caveat below. |
start | whole seconds | Begins at that offset. Integers only. |
end | whole seconds | Stops there. Applies to the first play only. |
loop | 0, 1 | Repeats. Useless on its own; see playlist. |
playlist | ids, comma separated | A queue. Repeat the video id here to make loop work. |
list | playlist id | Plays a real playlist. Pair with /embed/videoseries. |
rel | 0, 1 | Restricts suggestions to the same channel. It no longer removes them. |
cc_load_policy | 1 | Turns captions on by default. |
cc_lang_pref | language code | Which caption track to prefer, for example en. |
hl | language code | Interface language for the player itself. |
fs | 0, 1 | Removes the fullscreen button. |
iv_load_policy | 1, 3 | 3 hides annotation overlays. |
playsinline | 0, 1 | Stops iOS taking the video fullscreen on play. |
enablejsapi | 1 | Lets the IFrame API attach and drive playback. |
origin | your origin | Required alongside enablejsapi for security. |
color | red, white | Progress bar colour. Two options, and that is all. |
The two that break embeds most often
Loop does nothing without playlist
loop=1 on a single video is silently ignored. The player loops a queue, and a queue of one video is not created by the loop parameter itself. You have to name the video again:
https://www.youtube.com/embed/dQw4w9WgXcQ?loop=1&playlist=dQw4w9WgXcQThis is the single most common broken YouTube embed on the web, because nothing tells you it failed. The video simply stops at the end.
Autoplay does nothing without mute
Every current browser blocks autoplay with sound. Chrome, Safari and Firefox all allow a muted video to start on its own and all refuse an audible one unless the visitor has a strong history of interacting with that site. Since you cannot know that in advance, an autoplaying embed has to be muted:
https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&mute=1A visitor can unmute once it is playing. An unmuted autoplay that never starts is worse than no autoplay at all, because the page shows a frozen first frame with no obvious play button.
Parameters that were removed
These still appear in tutorials and copied snippets. All of them are inert.
showinfostopped working in September 2018. It used to hide the title and uploader bar across the top of the player.modestbrandingwas removed in August 2023. It reduced the YouTube logo in the control bar. Nothing replaced it.themeandautohidewere retired years earlier. The player has one theme and one chrome behaviour.rel=0is a special case. It was not removed, but its meaning changed in September 2018. It used to suppress suggested videos at the end. Now it restricts them to the same channel, and if that channel has nothing else, you get unrelated videos anyway.
What controls=0 actually does
This one surprises people who are trying to build a clean-looking player.controls=0 hides the YouTube control bar while the video is playing. Pause it, or move the mouse over it, and the player redraws its own header, its logo, a timestamp, a "Watch on YouTube" button and a grid of suggestions, all inside the frame. Nothing outside the iframe can prevent that: it is another origin, and the browser will not let your CSS or your JavaScript reach into it.
Three things genuinely reduce it. fs=0 removes the fullscreen button, iv_load_policy=3 drops annotation overlays, and a transparent element positioned over the iframe swallows pointer events so hover never triggers the chrome in the first place. That last one is how a replacement control bar stays usable, and it is covered inbuilding your own controls.
What you cannot do at all
- Remove the YouTube logo from the player.
- Restyle anything inside the frame: fonts, colours, button shapes.
- Prevent, skip or detect ads.
- Read how far through the video someone got, except through the IFrame API.
- Stop the "Watch on YouTube" affordance appearing on pause.
If you need any of those, the video has to be hosted somewhere you control and played through a <video> element, where the whole surface is yours. That is a bandwidth decision as much as a design one.
Privacy and the cookie question
A standard youtube.com/embed frame sets cookies as soon as it loads, which in the EU generally means it needs consent before it appears. Two changes reduce that surface. Serving fromyoutube-nocookie.com defers cookie setting until playback begins. Loading a thumbnail instead of the player, and only fetching the real iframe when someone clicks, means nothing from YouTube runs on your page unless the visitor asked for it. The second approach also happens to be the biggest page speed win available, which is the subject ofembedding video without wrecking your page speed.