Skip to content
YouTube Toolskits

YouTube Embed Code Generator

YouTube's own Share → Embed dialog gives you a basic iframe. This generator adds the options people usually have to look up: a start time, autoplay, looping a single video, hiding controls, privacy-enhanced mode and a responsive wrapper that scales with the page.

You see a live preview of the player with your settings before copying the code.

How to use the embed code generator

  1. 1Paste the video link.
  2. 2Choose size and options.
  3. 3Check the preview, then copy the code into your site or page builder.

How it works

The generator builds a standard YouTube iframe with player parameters (start, autoplay, mute, controls, loop, playlist). Autoplay always adds mute, because modern browsers block autoplay with sound. Looping a single video requires the playlist parameter to be set to the same video ID, which the tool does for you.

Privacy-enhanced mode uses the youtube-nocookie.com domain, which YouTube says won't store information about visitors unless they play the video.

Frequently asked questions

How do I make the YouTube embed responsive?

Turn on Responsive. The code wraps the iframe in a container that keeps the aspect ratio and fills the available width.

Why doesn't autoplay work with sound?

Chrome, Safari and Firefox only allow autoplay when the video is muted. Viewers can unmute it.

Can I start the video at a specific time?

Yes. Enter the start time in seconds or as mm:ss.

Can every video be embedded?

No. Uploaders can disable embedding; those videos show an error in the player.