Embed videos and playlists

You can add a YouTube video or playlist to a website or blog by embedding it.

If you are an educator, get in touch with your Educational Technology platform for info on how to embed YouTube content for your classes.

The YouTube API Terms of Service and developer policies apply to all access and use of the YouTube embedded player.

Embed a video or playlist

  1. On a computer, go to the YouTube video or playlist that you want to embed.
  2. Click SHARE .
  3. From the list of Share options, click Embed.
  4. From the box that appears, copy the HTML code.
  5. Paste the code into your website HTML.
  6. For network administrators: You'll need to add youtube.com to the firewall allowlist.
  7. Important: If your website or app is child-oriented and you embed YouTube content, you must self-designate your site or app using these tools. This self-designation will ensure that Google does not serve personalised ads on these sites or apps, and some features will be turned off in the embedded player.
Note: Age-restricted videos can't be watched on most third-party websites. These videos will redirect viewers back to YouTube when played.

Manage video embedding options

The privacy-enhanced mode of the YouTube embedded player prevents the use of views of embedded YouTube content from influencing the viewer's browsing experience on YouTube. This means that the view of a video shown in the privacy-enhanced mode of the embedded player will not be used to personalise the YouTube browsing experience, either within your privacy-enhanced mode embedded player or in the viewer's subsequent YouTube viewing experience.

If ads are served on a video shown in the privacy-enhanced mode of the embedded player, those ads will likewise be non-personalised. In addition, the view of a video shown in the privacy-enhanced mode of the embedded player will not be used to personalise advertising shown to the viewer outside of your site or app.

As a reminder, the YouTube API Terms of Service and developer policies apply to the access and use of the YouTube embedded player.

To use privacy-enhanced mode:

  1. Change the domain for the embed URL in your HTML from https://www.youtube.com to https://www.youtube-nocookie.com.
  2. For network administrators: You'll need to add youtube-nocookie.com to the firewall allowlist.
  3. For use in applications, use a WebView instance of the embedded player. Privacy-enhanced mode is currently available only for embedded players on websites.
  4. Important: If your website or app is child-directed, you must self-designate your site or app using these tools, as required by the YouTube API Terms of Service and developer policies, even if you embed YouTube videos with the privacy-enhanced mode player.

Example:

Before

<iframe width="1440" height="762"

src="https://www.youtube.com/embed/7cjVj1ZyzyE"

frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

After

<iframe width="1440" height="762" src="https://www.youtube-nocookie.com/embed/7cjVj1ZyzyE"

frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Note: If the viewer clicks or taps out of the embed and is redirected to another website or app, that website or app may track the viewer's behaviour as per that website's or app's policies and terms.

Was this helpful?

How can we improve it?
8464634655102116724
true
Search Help Centre
true
true
true
true
true
59
Search
Clear search
Close search
Main menu
false
false
false
false