YouTube Embed Code Generator

Build a YouTube iframe embed with a responsive wrapper, privacy mode and the player options you actually need — including the ones that quietly do not work.

Responsive 16:9
Privacy mode by default
Completely Free
Works with watch links, youtu.be, Shorts, embed and live URLs
What Each Parameter Really Does
ParameterWhat it doesThe catch
autoplay=1Starts playing on loadBlocked unless mute=1 is also set
loop=1Repeats the videoDoes nothing without playlist=VIDEO_ID
rel=0Limits related videosSince Sept 2018 it shows your own channel, not nothing
controls=0Hides the player controlsClicking still plays and pauses
start / endTrims playbackSeconds only; the player snaps to the nearest keyframe
modestbrandingUsed to shrink the logoDeprecated August 2023 — no effect at all

Your privacy is protected! No data is transmitted or stored.

Frequently Asked Questions

Because loop=1 does nothing on its own. To make a single video repeat you also have to add playlist=VIDEO_ID with the same ID as the video you are embedding — YouTube treats the loop as looping a playlist, so without one there is nothing to loop. This generator adds that parameter for you whenever you tick Loop.
Because browsers block videos that start playing with sound. Autoplay only works when the player is muted, so the embed needs mute=1 alongside autoplay=1. Ticking Autoplay here switches Mute on for you, and warns you if you turn it back off.
Not any more. Until September 2018 rel=0 hid related videos completely. Since that change it limits them to your own channel instead, and there is no longer any way to remove the end screen entirely. Any tool still promising to hide related videos is describing behaviour that stopped working years ago.
It is YouTube's privacy-enhanced embed domain. The player looks and behaves the same, but YouTube holds off on storing tracking cookies until the viewer actually presses play. That is usually what cookie-consent rules are asking for, which is why this generator uses it by default.
Fixed width and height attributes will overflow on a phone. The fix is to wrap the iframe in a box with padding-bottom of 56.25% — that is 9 divided by 16 — and stretch the iframe to fill it. Tick Responsive and the generator produces that wrapper, so the video scales with whatever column you paste it into.
Because the parameter that used to do it, modestbranding, was deprecated in August 2023 and now has no effect at all. Plenty of generators still show that checkbox, but ticking it changes nothing. We leave it out rather than hand you a parameter that does not work.
The code is built inside your browser and nothing you type reaches CodBolt. The one exception is that we ask YouTube's public oEmbed endpoint for the video title, so the iframe gets a proper accessibility label instead of a generic one. If that request fails the generator carries on with a fallback title.