My Tool Studio
YouTube

YouTube Embed Generator

An iframe with the right attributes beats whatever a CMS pastes in by default, and this youtube embed code generator builds that iframe from any video link. Set the width and height, pick a start time, then toggle autoplay, mute, controls, and loop with checkboxes while a live preview shows exactly what visitors will get. The finished snippet includes the full allow attribute list and allowfullscreen, so picture in picture and fullscreen work out of the box. Anyone who needs to embed youtube video html into a blog post, a landing page, or documentation can copy the result in seconds. Pair the output with a little CSS and you have a responsive youtube embed that scales down cleanly on phones.

Always freeNo sign upRuns in your browser

How to use

01

Paste the video link

Enter any YouTube URL or video ID into the field at the top. Watch links, youtu.be links, and bare IDs all resolve to the same embed source.

02

Configure size and playback

Adjust Width and Height, set Start in seconds, then use the Autoplay, Muted, Show controls, and Loop checkboxes. The live preview under the options updates as you change them.

03

Copy the embed code

Scroll to the Embed code box and hit the copy button. The generated iframe carries the allow list and allowfullscreen attribute, ready to paste into your page's HTML.

Why YouTube Embed Generator

Common questions

Why does autoplay not work in my YouTube embed?
Browsers block autoplay with sound, so check both Autoplay and Muted together. Chrome, Safari, and Firefox will all start a muted video automatically, and the viewer can unmute manually. Autoplay alone gets silently ignored.
How do I make the generated YouTube embed responsive?
The iframe ships with fixed width and height values. Wrap it in a container with aspect-ratio 16 / 9 in CSS and set the iframe to 100 percent width and height. That turns the fixed snippet into a responsive youtube embed without changing the URL.
Can the embed start at a specific timestamp?
Yes, put the second count into the Start field. A value of 90 begins playback at 1:30. The tool adds start=90 to the embed URL, which works whether or not the original link had a t parameter.
What does the Loop checkbox actually add to the code?
YouTube's loop parameter only works alongside a playlist parameter containing the same video ID, so the tool sets both for you. That quirk trips up people writing embed URLs by hand.
Does the youtube embed code generator support privacy enhanced mode?
The generated snippet uses the standard youtube.com/embed domain. For the privacy enhanced version, swap the domain in the copied code to www.youtube-nocookie.com. Every parameter, including start time and controls, keeps working unchanged.
What causes the playback on other websites has been disabled message?
The uploader turned off embedding for that video, which no embed code can override. It plays only on youtube.com. Choose a different video or link out to the watch page instead.
Is hiding the player controls a good idea for embeds?
Unchecking Show controls sets controls=0, which gives a cleaner frame for background style videos. For anything viewers actually watch, keep controls on, since removing seek and volume options frustrates people and hurts accessibility.

More YouTube tools

View all