How to Use This Tool
The embed code YouTube gives you when you press Share has a fixed width of 560 pixels. On a phone that is wider than the screen, so it either overflows and creates a horizontal scrollbar or gets squashed with the wrong aspect ratio. This generator produces the responsive version instead, along with everything else the share dialog does not offer.
The options that behave unexpectedly
- Autoplay requires mute. Every current browser blocks autoplay with sound. Ticking autoplay alone produces an embed that silently refuses to start, which looks like a bug and is not. The tool ticks mute for you and explains why.
- Loop requires a playlist parameter. On its own
loop=1does nothing for a single video. It only works whenplaylistis set to the same video ID — an undocumented quirk that the generator handles automatically. - Related videos cannot be removed. Since 2018
rel=0no longer hides them; it only restricts suggestions to the same channel. Any tool promising to remove them entirely is describing behaviour that stopped existing years ago.
The privacy domain
With privacy domain ticked the embed points at youtube-nocookie.com. That
version sets no tracking cookies until the visitor actually presses play. It matters for two reasons: under
GDPR a standard embed is a third-party tracker that legally needs consent before it loads, and a normal
embed drops several cookies on page load whether or not anyone watches. The video plays identically. There
is very little reason not to use it.
Start and end times
Enter times as seconds or m:ss. Note that embeds use start and end
in whole seconds, not the t parameter that watch links use — pasting a t=90s value
into an embed URL does nothing at all, which is a quietly frustrating hour to lose. The generator converts
between them.
Copy the CSS too
Leave the wrapper CSS included unless your site already has an aspect-ratio helper. It is four lines and
it is the entire difference between an embed that works on a phone and one that does not. If you are using
Tailwind, the equivalent is aspect-video w-full on the wrapper.
