PDF download Download Article
Learn how to share a YouTube video on your website with an embed code
PDF download Download Article

Embedding a YouTube video into a blog or website allows you to share videos freely across the internet. Since YouTube handles the video traffic, you don't have to worry about managing your site's bandwidth. Keep in mind this can't be done on mobile; it can only be done on the website. Here's how to embed a YouTube video into your blog post or website using a computer.

Quick Steps

  1. Go to a YouTube video or playlist on a desktop browser.
  2. Click Share below the video.
  3. Click Embed .
  4. Click Copy .
  5. Paste the embed code into a blog post, webpage, or another location.
  1. Go to https://www.youtube.com in a web browser. You'll need to be using YouTube on a computer to get the embed code for your video. [1]
  2. Use the search bar to find the video or playlist , or find it in your library.
    Advertisement
  3. This is underneath the video, next to the Download icon.
    • A pop-up window will open.
  4. This is the first option, underneath the <> icon.
    • Alternatively, embed videos or playlists on social media with the "Share" function. If you only want to post the video to Facebook, Twitter/X , Pinterest, or Tumblr, you can simply click on the appropriate icon in the "Share" window below the video. YouTube will prompt you to log into your social media account and automatically embed the video for you.
  5. Before you embed the video, you can change the options, such as starting time, player control visibility, and privacy-enhanced mode.
    • To change the start time, click Start at and enter a starting timestamp.
    • To enable player controls (video playback and volume), check the box for Show player controls .
    • To turn on privacy-enhanced mode, check the box for Enable privacy-enhanced mode . This prevents YouTube from storing visitor information unless they play the video.
  6. You can find this at the bottom-right corner of the pop-up window.
    • This will save the embed code to your computer's clipboard.
  7. This is usually your webpage's HTML editor. HTML is a type of code used to build websites, and the embed code on YouTube is designed to insert into the code and display the video without any changes. Many blogging websites let you insert the video directly into the post as well without changing your website's code.
    • Blog Posts: Begin a new post. Click the "HTML" link (or similar) in the toolbar above the post. This will display the code of your post but will keep your website's code intact.
    • Website: Locate the HTML files for your website. You can edit them using a text editor like NotePad or TextEdit on Mac. You can also edit them using an HTML editor such as Adobe Dreamweaver. When you are done editing the HTML files, you will need to upload the files to your server manually or using FTP .
  8. You can either right-click and choose Paste or press Control + V (PC) or Command + V (Mac) to paste the embed code. [2]
    • Be sure to publish your changes. The YouTube video will be embedded.
  9. Advertisement

Community Q&A

Search
Add New Question
  • Question
    What do you do if the share button on YouTube doesn't do anything but make a gray haze?
    B Chen
    Community Answer
    If you are on the mobile YouTube app, there is nothing you can do. However, if you are on desktop, you can right click on the video and select "Copy embed code".
Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Article Summary X

      1. Go to YouTube.
      2. Click the video.
      3. Click Share .
      4. Click Embed .
      5. Highlight the embedding code.
      6. Click COPY .
      7. Right-click the embedding location.
      8. Click Paste .

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 195,946 times.

      Is this article up to date?

      Advertisement