How to build a YouTube playlist and add it to a website

Default Avatar admin
November 24, 2022

YouTube is a popular service for storing and watching videos. You can upload your own videos to YouTube’s server for public access, enabling anyone to find them and watch them. YouTube also lets you create playlists for groups of videos so that they can be automatically played sequentially or in random order.

However, the functionality of video hosting doesn’t end there. You can also embed a YouTube video or playlist into a page on your site where your visitors can view it, so it could be part of your video marketing.

Our friends at Netpeak Software have prepared a helpful guide on how to create a YouTube playlist of different videos and embed it into your website pages.

How to embed a YouTube video on a site

To embed a video from YouTube, you must:

  1. Open the video page, click the “Share” button, and select “Embed”:

  1. In the pop-up window, copy the code and publish it on your site using any HTML editor:

How to embed a ready-made playlist on a site

If you found a video that’s already part of a playlist, you can add it to your site by following these steps:

  1. Go to the channel and open the desired playlist in the “Playlists” section:

  1. Click the name of the playlist in the column on the right with the list of all the videos in it:

  1. Click “Share” and select “Embed”:

  1. In the pop-up window, copy the code and publish it on your site using any HTML editor:

The result will look something like this:

How to create your own YouTube playlist

You may find that you would like to share several videos from different channels somewhere on your site. In this case, you won’t have a playlist on hand that another user has already made. However, you can create the playlist yourself by publishing the following code:

<iframe style=”max-width:100%;” width=”560″ height=”315″ src=”{video ID 1}?playlist={video ID 1},{video ID 2},{video ID 3},{video ID 4},{video ID 5},{video ID 6}” frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen=””></iframe>

Here, {video ID 1} is the ID of the first video of the playlist, and {video ID 2}, {video ID 3}, {video ID 4}, and so on are the IDs of the other videos, separated by commas.

You can find a YouTube video’s ID in its URL, after


A YouTube video can be great illustrative material that complements a publication on your site. YouTube’s video hosting functionality allows you to use the Frame code to embed a video or entire playlist into a website page without uploading it to your own server. If the videos you want to share were posted on different YouTube channels, you could use the ID of each video to combine them into one playlist yourself.