Social Media

How to Embed a YouTube Playlist on Your Website (2026 Guide)

Matt
· Updated 8 min read

TL;DR - Quick Answer

20 min read

Comprehensive guide with practical insights you can apply today.

How to Embed a YouTube Playlist on Your Website

Quick answer: grab the playlist ID from the list= part of the playlist URL, drop it into the iframe below, and paste that into any HTML block on your site. One embed, every video, with the playlist queue built into the player.

<iframe
  width="560"
  height="315"
  src="https://www.youtube.com/embed/videoseries?list=PLAYLIST_ID"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  referrerpolicy="strict-origin-when-cross-origin"
  allowfullscreen>
</iframe>

That is not a hand-rolled snippet. It is the markup YouTube's own oEmbed endpoint returns when you hand it a playlist URL, which is the closest thing to a canonical playlist embed that exists.

Create content, post everywhere

Create captions, images, and videos with AI. Schedule to 9 platforms in seconds.

Start your free trial

Jump to:

Get Your Playlist ID

Open the playlist on YouTube. The URL looks like this:

https://www.youtube.com/playlist?list=PLC77007E23FF423C6

Everything after list= is the playlist ID. In that example it is PLC77007E23FF423C6.

The first two characters tell you what kind of playlist you have, and they all embed the same way:

PrefixWhat it isEmbeddable
PLA normal playlist someone createdYes
UUA channel's automatic "uploads" playlistYes
LLYour liked videosNo, it is private to your account
WLWatch LaterNo, it is private to your account

The UU prefix is the useful one nobody mentions. Every channel has a hidden uploads playlist that always contains its newest videos, and you build the ID by taking the channel ID and swapping the leading UC for UU. Channel UC_x5XG1OV2P6uZZ5FSM9Ttw becomes playlist UU_x5XG1OV2P6uZZ5FSM9Ttw. Embed that and your site shows the channel's latest uploads forever without you touching the code again.

The zero-guesswork way to get the embed code

If you would rather not build the URL by hand, ask YouTube for it. Paste this into your browser's address bar with your own playlist URL on the end:

https://www.youtube.com/oembed?format=json&url=https://www.youtube.com/playlist?list=PLAYLIST_ID

YouTube returns a small block of JSON containing an html field with a ready-made iframe, plus the playlist title, the channel name, and a thumbnail URL. If that request errors out, the playlist is not publicly embeddable and no amount of hand-written HTML will fix it. It is a 5 second pre-flight check.

Add the Embed to Your Site

Every platform needs the same thing: somewhere that accepts raw HTML. Only the name of the box changes.

PlatformWhere the iframe goes
WordPress (block editor)Add a Custom HTML block, or just paste the playlist URL into a paragraph block and let auto-embed handle it
WordPress (Elementor)The HTML widget
WixAdd Elements, then Embed Code, then Embed HTML
SquarespaceA Code block
ShopifyThe <> / Show HTML view inside the page or blog post editor
WebflowAn Embed element
Plain HTML siteAnywhere in the <body> of the file

WordPress auto-embed works because WordPress calls the same oEmbed endpoint shown above, so a bare youtube.com/playlist?list=... URL on its own line turns into a real playlist embed rather than a link. If you need parameters like autoplay, skip auto-embed and use the Custom HTML block instead, because auto-embed strips them.

Quick Knowledge Check
Test your understanding

What's the correct URL format to embed a YouTube playlist?

💡
Hint: Remember: videoseries in the embed URL tells YouTube to load the full playlist, not just one video.

Two URL forms, both valid

There are two ways to point the player at a playlist and both currently load:

<!-- The form YouTube's oEmbed endpoint returns -->
<iframe src="https://www.youtube.com/embed/videoseries?list=PLAYLIST_ID" allowfullscreen></iframe>
 
<!-- The form shown in YouTube's player parameter reference -->
<iframe src="https://www.youtube.com/embed?listType=playlist&list=PLAYLIST_ID" allowfullscreen></iframe>

The IFrame Player API reference documents the listType=playlist version and notes that when you supply list and listType, "the IFrame embed URL does not need to specify a video ID." The videoseries path is the older form, but it is still what YouTube hands out today, so there is no reason to migrate working embeds.

To start the playlist on a specific video, put that video's ID in the path and keep the playlist in the query string:

<iframe src="https://www.youtube.com/embed/VIDEO_ID?list=PLAYLIST_ID" allowfullscreen></iframe>

Player Parameters That Actually Work

This is where most playlist embed tutorials are years out of date. YouTube has quietly killed several parameters that still circulate on blogs and Stack Overflow answers.

ParameterWhat it doesStatus
autoplay=1Starts the first video on loadDocumented, works
mute=1Starts the player mutedUndocumented, works, required for autoplay
loop=1Plays the whole playlist, then restarts from video 1Documented, works
controls=0Hides the player controlsDocumented, works
start=90Begins the current video 90 seconds inDocumented, works
cc_load_policy=1Shows captions by defaultDocumented, works
playsinline=1Plays inline on iOS instead of going fullscreenDocumented, works
disablekb=1Disables keyboard controlsDocumented, works
fs=0Removes the fullscreen buttonDocumented, works
rel=0Does not hide related videos anymoreBehaviour changed, see below
modestbranding=1NothingDeprecated, delete it
showinfo=1NothingRemoved from the reference
index=3Nothing reliableNot in the parameter reference at all

Three of these deserve a longer explanation, because getting them wrong is what makes an embed look broken.

modestbranding is dead. YouTube's IFrame Player API reference now carries the flat statement that the parameter "is deprecated and has no effect," and the revision history dates that change to 15 August 2023. If a tutorial tells you to add it to strip YouTube branding, that tutorial has not been updated in three years. Branding is now decided by the player itself based on size and other signals. Delete the parameter, it is pure noise in your URL.

rel=0 no longer means "no related videos." The reference is explicit that after the September 2018 change, setting rel=0 means related videos "will come from the same channel as the video that was just played." You cannot switch off end-of-video suggestions with a URL parameter. On your own channel's playlist, rel=0 is still worth setting, because it keeps the suggestion grid pointed at your own content instead of a competitor's.

mute=1 is not in YouTube's published parameter list, yet it is the single most important parameter for autoplay. Browsers block autoplay with sound, so autoplay=1 on its own silently does nothing on most visits. Pair them:

<iframe src="https://www.youtube.com/embed/videoseries?list=PLAYLIST_ID&autoplay=1&mute=1" allowfullscreen></iframe>

One caveat on loop: for a playlist, loop=1 on its own is enough. Looping a single video is the awkward case, because the reference tells you to set loop=1 and also set the playlist parameter to the same video ID that is already in the URL path.

Make the Embed Responsive

Fixed width and height attributes overflow on phones. Wrap the iframe in a padded box instead:

<style>
.yt-playlist {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.yt-playlist iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
</style>
 
<div class="yt-playlist">
  <iframe
    src="https://www.youtube.com/embed/videoseries?list=PLAYLIST_ID"
    loading="lazy"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

Two things worth keeping in that snippet. loading="lazy" tells the browser not to fetch the player until the iframe is near the viewport, which matters because a YouTube embed pulls a large amount of JavaScript. And if your page has a modern CSS baseline you can use aspect-ratio: 16 / 9 on the iframe directly instead of the padding trick, which is far less code.

If page speed is the real concern, the strongest option is not an iframe at all: render a static thumbnail and only inject the iframe on click. That drops the YouTube payload from the initial page load entirely. The same logic applies to other social embeds, which we cover in the social media aggregator guide.

Why Your Playlist Embed Is Broken

Work down this list in order. The causes are ordered from most common to most obscure.

1. Only one video plays, no queue appears. You used /embed/VIDEO_ID without a list= parameter, or you used ?playlist= instead of ?list=. The playlist parameter takes a comma separated list of video IDs, not a playlist ID. They are different things with confusingly similar names.

2. The player loads but says the video is unavailable. YouTube Help lists three reasons a video will not appear inside an embedded playlist: the uploader disabled embedding on it, the video is age restricted, or the video is private and has not been shared with you. A single bad video does not always break the whole playlist, but a playlist made mostly of other people's videos can end up mostly empty.

3. The playlist itself is private or unlisted. Unlisted playlists do embed. Private ones do not. Check the playlist's visibility setting, not just the visibility of the videos inside it.

4. Everything is blank and you see "error 153." This one is almost never diagnosed correctly. YouTube's Help documentation states that its Terms of Service "require embedders to provide a HTTP Referer" and that "if this information is missing, viewers attempting to watch embedded YouTube videos will encounter blocked playback and an error screen ('error 153')." That happens when your site sends Referrer-Policy: no-referrer, when the page is opened from a file:// path during local testing, or when you load the embed URL directly in a browser tab with no parent page. The fix is to set referrerpolicy="strict-origin-when-cross-origin" on the iframe, which is exactly what YouTube's own generated markup uses, and to test on a real http or https origin rather than a local file.

5. Autoplay does nothing. Add mute=1. See the parameter section above.

6. It works for you, breaks for visitors. You are signed in and they are not. Always test a playlist embed in a private window, signed out, before you call it done.

7. A consent banner is swallowing the embed. Many cookie tools block third party iframes until consent is given, replacing them with a placeholder. That is the tool working correctly, not a YouTube problem.

Privacy Enhanced Mode and GDPR

Swap the domain and nothing else changes:

<iframe src="https://www.youtube-nocookie.com/embed/videoseries?list=PLAYLIST_ID" allowfullscreen></iframe>

Be precise about what this buys you. YouTube's Help documentation describes privacy enhanced mode as preventing "the use of views of embedded YouTube content from influencing the viewer's browsing experience on YouTube," and says that ads served on those videos are non-personalized and that views "will not be used to personalize advertising shown to the viewer outside of your site or app."

Read that carefully: it is a personalization control, not a "no cookies" guarantee, and Google does not describe it as GDPR compliance. The nocookie domain still sets storage in some situations. If you have EU visitors and you need to be safe, the reliable pattern is still consent gating: show a static thumbnail with a play button, and only insert the iframe after the visitor clicks or accepts your cookie banner. Privacy enhanced mode is a sensible default on top of that, not a replacement for it.

Playlist vs Single Video Embed

Single videoPlaylist
Videos shownOneThe whole series
Viewer can browse without leavingNoYes, via the queue panel
Auto-advance to the next videoNoYes
Stays fresh without editsNoYes, if you keep adding to the playlist
Best forOne explainer, one demoTutorial series, episodes, product lines
Player real estate usedAll videoQueue panel eats horizontal space on narrow screens

The last row is the one people forget. On a phone, the playlist queue panel is collapsed, but on a narrow sidebar embed it can take a meaningful slice of the player width. If your embed is under roughly 400 pixels wide, a single video usually looks better.

Playlists also age better. Add a new video to the playlist and every page that embeds it updates automatically, which is why the UU uploads-playlist trick above is so useful for a "latest videos" section. If you are building that kind of module, the YouTube widget guide covers the display options, and adding videos to a playlist covers the upkeep.

Advanced Control With the IFrame API

If you need JavaScript control, playback events, or the ability to swap playlists without reloading the page, use the IFrame Player API instead of a plain iframe:

<div id="player"></div>
<script>
var player;
function onYouTubeIframeAPIReady() {
  player = new YT.Player('player', {
    height: '360',
    width: '640',
    playerVars: {
      listType: 'playlist',
      list: 'PLAYLIST_ID'
    }
  });
}
</script>
<script src="https://www.youtube.com/iframe_api"></script>

What this unlocks that a plain iframe cannot do: player.nextVideo() and player.playVideoAt(index) for custom navigation, onStateChange events so you can fire analytics when a viewer finishes a video, and player.loadPlaylist() to swap the whole queue on the fly. The cost is a second script request and code you now have to maintain. For a static "here are our tutorials" section, the plain iframe is the right call.

Full reference: YouTube IFrame Player API and the player parameters list.

Frequently Asked Questions

Do I need to own the playlist to embed it?
No. Any public playlist can be embedded, including someone else's. What you cannot control is the content: if the owner removes videos, disables embedding on them, or deletes the playlist, your embed changes or breaks with no warning. For anything load-bearing on your site, embed a playlist you control.
Can I embed a private or unlisted YouTube playlist?
Unlisted playlists embed normally, which is the usual way to publish a playlist on your site without listing it on your YouTube channel. Private playlists do not embed at all. Note that a public playlist can still contain private videos, and those individual videos will not play inside the embed.
Why does modestbranding=1 no longer remove the YouTube logo?
Because YouTube deprecated it. The IFrame Player API reference now states that the parameter is deprecated and has no effect, a change dated 15 August 2023 in the reference's revision history. YouTube decides player branding itself based on the player size and other signals. There is no supported parameter that removes YouTube branding from an embed.
How do I hide related videos at the end of a playlist?
You cannot fully hide them. Before September 2018, rel=0 suppressed related videos. Now, per YouTube's parameter reference, rel=0 only restricts the suggestions to videos from the same channel as the one that just played. On your own channel's playlist that is still worth setting, because it keeps viewers inside your own catalogue.
How do I make a YouTube playlist embed autoplay?
Add both autoplay=1 and mute=1 to the embed URL. Every major browser blocks autoplay with sound, so autoplay=1 on its own will usually be ignored. Note that mute is not listed in YouTube's published player parameter reference even though the player honours it.
How do I embed a channel's newest videos instead of a fixed playlist?
Use the channel's automatic uploads playlist. Take the channel ID, which starts with UC, and replace the UC with UU. Embedding that playlist ID gives you a self-updating feed of the channel's most recent uploads, so the embed stays current without you editing the page.
Does embedding a YouTube playlist slow down my page?
Yes, a YouTube iframe pulls a substantial amount of JavaScript. Add loading="lazy" to the iframe so the browser defers it until it is near the viewport. For a bigger win, show a static thumbnail and only insert the iframe when the visitor clicks it, which keeps the YouTube payload off the initial page load entirely.
What is error 153 on an embedded YouTube playlist?
It means the embed did not send an HTTP Referer header. YouTube's Help documentation states that its Terms of Service require embedders to provide one, and that playback is blocked with error 153 when it is missing. It typically shows up when you test from a local file path, load the embed URL directly with no parent page, or run a strict no-referrer referrer policy on your site.

Was this article helpful?

Let us know what you think!

#SocialMedia#ContentStrategy#DigitalMarketing

📚 Continue Learning

More articles to boost your social media expertise