Embedding a YouTube video into a blog or website allows you to share videos freely across the internet. There is no cost, and since YouTube handles the video traffic, you don't have to worry about managing your site's bandwidth. This wikiHow teaches you how to embed a YouTube video or playlist into your blog post or HTML code when you're using a computer.

Method 1
Method 1 of 2:

Embedding a Video

  1. 1
    Go to https://www.youtube.com on a computer. You'll need to be using YouTube on a computer to get the embed code for your video.[1]
  2. 2
    Go to the video you want to embed. Search for the video, and then click its name in the search results.
    Advertisement
  3. 3
    Decide where you want the embedded video to begin. If you want the video to start playing from the beginning on your website, you can skip to the next step, as that's the default option. But if you want the video to start playing at a certain point, drag the red dot (the playhead) to the desired place in the video and click Pause (if the video isn't already paused). Or, just click the Play button and then select Pause once you've reached the correct point in the video.
  4. 4
    Click the Share button. It's below the video's bottom-right corner. The button has a curved arrow on it. Options for sharing the video will expand.
  5. 5
    Click Embed. It's the first icon under "Share a link" and contains two angled brackets. This displays the embed code for the video.
  6. 6
    Choose your embedding options.
    • The video will start playing from the beginning by default. If you chose a different starting point, check the box next to "Start at." The correct time will appear in the corresponding box.
    • To display player controls (such as the ability to pause or skip ahead) on the embedded video, check the box next to "Show player controls."
    • Check the box next to "Enable privacy-enhanced mode" if you want to prevent YouTube from tracking your website visitors who don't click the video.
  7. 7
    Click the COPY link. It's at the bottom-right corner of the window. This copies the embed code to your clipboard.
    • The code will look something like this: <iframe width="560" height="315" src="https://www.youtube.com/embed/lj9OgGQ_QkY" frameborder="0" allowfullscreen></iframe>
  8. 8
    Open up 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. In the toolbar above the post, click the "HTML" link (or similar). 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 such as 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.
  9. 9
    Find where you want your video in the HTML. Since any words your typed will be displayed in the HTML, you can use the text to determine where in the page your video will go. For example, if I wrote a post that says "Check out my new video:" those exact words will appear somewhere in the HTML code.
  10. 10
    Make space for your video. Once you've found where you want the video, click in between the surrounding code and hit the space bar. Almost all code begins with a "<" and ends with a ">". Be sure to put your embed code outside of a pre-existing line of code.
    • Wordpress Blog Example: Check out <b>my video here:</b> would read as "Check out my video here: (EMBEDDED VIDEO)
    • You can create a line break after a paragraph or text in HTML by typing <br>
  11. 11
    Paste the video code where you want the video to go. You can either right-click and choose Paste or press Control + V (PC) or Command + V (Mac) to paste the embed code.
  12. 12
    Publish your changes. Click Save changes, Publish, or Post or something similar to save your post with the embedded code. Look over your post and make sure the video is where you want it to be.
    • Alternatively, embed videos on social media with the "Share" function. If you only want to post the video to Facebook, Twitter, 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.
  13. Advertisement
Method 2
Method 2 of 2:

Embedding a Playlist

  1. 1
    Go to https://www.youtube.com on a computer. You'll need to be using YouTube on a computer to get the embed code for your playlist.
  2. 2
    Click the Library link. It's in the left panel.
  3. 3
    Click VIEW FULL PLAYLIST under the playlist you want to embed. Your playlists are in the "Playlists" section. If you don't see the one you're looking for on the main page, click SEE ALL in this section to open the full list.
  4. 4
    Open a text editor. This can be something like Notepad for Windows or TextEdit for macOS.
  5. 5
    Paste the embedding code template into the text editor. The code is <iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
    • To copy this text, use your mouse cursor to highlight the text you want to copy, and then press Control + C (PC) or Command + C (Mac) to copy. Then, right-click (or Control + click) in the text editor window and select Paste to paste it.
  6. 6
    Copy the Playlist ID from your browser's address bar. In the address bar at the top of your browser, you'll see a URL that looks similar to this: youtube.com/playlist?list=PLrxlAuU-npiXC2clkanh8TKoKfxzym6p9. You'll just need to copy the part that comes after the equal sign, which, in this case, is PLrxlAuU-npiXC2clkanh8TKoKfxzym6p9.
    • To copy this text, use your mouse cursor to highlight the text you want to copy, and then press Control + C (PC) or Command + C (Mac) to copy.
  7. 7
    Paste the Playlist ID into the embedding code. The Playlist ID must be pasted after list= at the end of the URL in the embed code. After you paste the Playlist ID, the code will look like this: <iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLrxlAuU-npiXC2clkanh8TKoKfxzym6p9" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
    • To do this, click the mouse right between list= and the quote ". Then, press Control + V (PC) or Command + V (Mac) to paste it. If any extraneous spaces appear, remove them.
  8. 8
    Copy the embed code to the clipboard. To do this, highlight everything in the text editor window using your mouse, and press Control + C (PC) or Command + C (Mac).
  9. 9
    Open up your webpage's HTML editor. 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. In the toolbar above the post, click the "HTML" link (or similar). 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 such as Notepad or TextEdit on Mac, or in an HTML editor like Dreamweaver. When you are done editing the HTML files, you will need to upload the files to your server manually or using FTP.
  10. 10
    Make space for the videos. Once you've found where you want the video, click in between the surrounding code and hit the space bar. Almost all code begins with a "<" and ends with a ">". Be sure to put your embed code outside of a pre-existing line of code.
    • Wordpress Blog Example: Check out <b>my playlist here:</b> would read as "Check out my playlist here: (EMBEDDED VIDEO)
    • You can create a line break after a paragraph or text in HTML by typing <br>
  11. 11
    Paste the embed code where the playlist should appear. You can either right-click and choose Paste or press Control + V (PC) or Command + V (Mac) to paste the embed code.
  12. 12
    Save and publish your changes. Click Save changes, Publish, or Post or something similar to save your post with the embedded code. Look over your post and make sure the playlist is where you want it to be.
  13. Advertisement

Community Q&A

  • Question
    What do you do if the share button on YouTube doesn't do anything but make a gray haze?
    B Chen
    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".
Advertisement

Warnings

  • It is illegal to use other people's music or videos to make a profit without proper acknowledgment of the creator.
    ⧼thumbs_response⧽
Advertisement

Things You'll Need

  • A computer with Internet access
  • Access to the HTML or page editor of a website

About This Article

Travis Boylls
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 142,221 times.
How helpful is this?
Co-authors: 19
Updated: July 1, 2021
Views: 142,221
Article SummaryX

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?
Advertisement