Embed videos and playlists

Add YouTube videos and playlists to a website or blog by embedding it.

Here’s how to embed a video:

  1. Click the Share link under the video.
  2. Click the Embed link.
  3. Copy the code provided in the expanded box.
  4. Paste the code into your blog or website.
  1. Click the Share link under the video.
  2. Click the Embed link.
  3. Copy the code provided in the expanded box.
  4. Paste the code into your blog or website.

Here’s how to embed a playlist:

  1. Click Playlists on the left side of your YouTube page
  2. Click the playlist title you'd like to embed.
  3. Click the Share link.
  4. Click the Embed link.
  5. Copy the embed code that appears in the menu below.
  6. Paste the code into your website or blog.

Embedding options


HTTPS (Hypertext Transfer Protocol Secure) adds a layer of protection around information traveling between your computer and a web server.

Websites that use HTTPS might generate a “mixed content” warning if a video isn’t embedded with HTTPS since not all parts on the webpage are secure, which is why you might select the “Use HTTPS” option under the embed code.

Enable Privacy-enhanced mode

Enabling this option means that YouTube won’t store information about visitors on your web page unless they play the video.

Use old embed code

There are two styles of embed codes that are available for YouTube videos.

  • New embed code: This code begins with "<iframe..." and supports both Flash and HTML5 video
  • Old embed code: This code begins with "<object..." and only support Flash.

Some sites only support the old embed code, so if a site rejects the new embed code, check the Use old embed code option under the embed code, which will generate a code that begins with “<object...”

Make an embedded video automatically play

To make an embedded video autoplay, add “&autoplay=1” to the video’s embed code, right after the video ID (the series of letters that follows “v/”).

Here’s an example:

    <object height="350" width="425"><param name="movie" value="http://www.youtube.com/v/OdT9z-JjtJk&autoplay=1" /><embed height="350" src="http://www.youtube.com/v/OdT9z-JjtJk&autoplay=1" type="application/x-shockwave-flash" width="425"></embed></object>
Start an embedded video at a certain time

Add “#t=” to a video’s embed code, followed by the time at which you’d like the video to begin playing.

For example, if you want a video to start at 2 minutes and 30 seconds into the video, your embed code would look something like the following:

    <iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/UkWd0azv3fQ#t=2m30s" width="420"></iframe>
Add captions to an embedded video
Make captions automatically appear for an embedded video by adding "&cc_load_policy=1" to the video's embed code.

You can also choose a caption language for the embedded video. To specify the caption language for the video that you'd like to embed, just add "&cc_lang_pref=fr&cc_load_policy=1" to the video's embed code.

  • "cc_lang_pref" sets the language for the captions shown in the video.
  • "cc_load_policy=1" turns captions on by default.
  • "fr" represents the language code for French. You can look up 2-letter language codes in the ISO 639-1 standard.
Disable embedding
If you've uploaded a video and do not want to allow others to embed your video on external sites, here's how to disable the option:
  1. Visit your Video Manager.
  2. Find the video you'd like to change and click Edit.
  3. Click Advanced Settings under the video.
  4. Uncheck the Allow Embedding checkbox under the "Distribution Options" section.
  5. Click Save changes at the bottom of the page.