Tutorial: How to Loop a YouTube Playlist

The video above is an example of a YouTube playlist that loops forever. It consists of 3 Jon Lajoie music videos that I never get tired of hearing. Here’s how you can have your very own looping YouTube playlist.

  1. Login to YouTube. If you don’t have an account, get one here…
  2. Go to a YouTube video that you like.
  3. Click “Playlists” near the bottom of the video.
  4. Make sure “[ New Playlist ]” is selected, then click “Add”.
  5. Enter whatever you want for “Playlist Name” and “Description”, then click “Save Playlist Info”.
  6. Go to another video that you want to add to the playlist you created and click “Playlists” again near the bottom of the video.
  7. This time, make sure the name of your playlist you created earlier is selected, then click “Add”. Do this for anymore videos you want in the playlist.
  8. When you’re done adding videos to the playlist, click your username at the top of the screen.
  9. Click “Playlists” which is also near the top of the screen.
  10. Find the name of the playlist you want to loop and click it.
  11. Copy and paste the contents of “Playlist/URL (Permalink):” into the YouTube Playlist Looper at following link…
  12. After pasting the permalink into the YouTube Playlist Looper, click “submit”.
  13. Your YouTube playlist should automatically start playing and start over when it reaches the end.
  14. You also have the option to copy and paste the resulting code to loop your playlist on your own website.

Ta da! That’s it. Enjoy your infinite playlist.

If you are interested in how I created the YouTube Playlist Looper, read on.

First, I googled “loop youtube playlist”. The first page of results didn’t have any solutions I liked, but it did have a link to a blog post that gave me a clue on how I might be able to loop a YouTube playlist.

Here’s the blog post that mentions the 2 parameters “&loop=1” and “&autoplay=1” that I needed to add to a playlist’s embed code…


To get a playlist’s embed code, I had to hover over my username in YouTube, then click “Playlists”. Then, I had to click the playlist name that I wanted to loop. Where it says “Embed:”, is the code I had to add the two parameters to.

The rest is pretty self explanatory if you understand JavaScript and view the source code of the YouTube Playlist Looper. I just had to get a user to input the ID of the playlist they wanted looped. Then, I returned the code with the 2 parameters automatically appended to the embed code that YouTube provided.

I did have some trouble with the display after hitting “submit”, but a quick trip to the javascript IRC channel helped me find my answer (see below).

As with everything I create, the YouTube Playlist Looper has been set free from any copyrights using the CC0 waiver.

Correspondence with temp01

#javascript@irc.freenode.net (4/11/09)
[10:42pm] jorel314: hello…
[10:44pm] jorel314: anyone care to help a javascript noob?
[10:44pm] temp01: maybe.. if the noob asks a question
[10:45pm] jorel314: I created this form that lets you loop a youtube playlist.. i was wondering how to get the results on the same page as the form..
[10:45pm] jorel314: http://dl.getdropbox.com/u/154234/youtube_playlist_looper.html
[10:46pm] jorel314: right now.. when I click submit.. the form disappears when the results show…
[10:46pm] temp01: firstChild.nodeValue = document.write .. lol
[10:47pm] jorel314: i’d like the results to appear on the same page…
[10:47pm] jorel314: be gentle.. it’s my first javascript program…
[10:47pm] temp01: sorry couldnt resist
[10:47pm] jorel314: i tried innerhtml..
[10:48pm] jorel314: but i don’t think that is part of DOM…
[10:49pm] temp01: jorel314: getElementById(‘results’).innerHTML = “<h1>PREVI….”
[10:50pm] jorel314: ok.. let me try that out..
[10:50pm] temp01: 99% of what you are using.. is not part of DOM
[10:51pm] temp01: i.e. standards-compliant
[10:51pm] jorel314: i was trying to get functionality first.. then fix it up to standards..
[10:54pm] jorel314: thanks temp01, it worked! http://dl.getdropbox.com/u/154234/youtube_playlist_looper_0.2.html


More of my tutorials (feed)
Alpha Nerd (feed)
Set Free (feed)

This entry was posted in jorel314 and tagged , , , , , , , , , , . Bookmark the permalink.

11 Responses to Tutorial: How to Loop a YouTube Playlist

  1. pimpyour says:

    Thnks for this great tutorial. I’ve use your tut to place youtube clips on my network and they work great. now i don’t have to take up too much space…thank you so much.

  2. jorel314 says:


    Glad it worked out for you!

  3. day says:

    For my self it does not work.
    but I found the solution from youtube.com by use ‘customer video player’

    How do I add a playlist to my blog or web page?

    To show a selection of videos that is easily editable, embed a playlist. When you update the playlist on YouTube, the playlist on your site will update as well. This is a good way of creating longer stories through a series of videos, or simply giving your readers more pre-selected content to watch.

    1. To create a playlist, go to the My Playlists page, click ‘Create a Playlist’ and fill out the information.
    2. As you find videos you like on YouTube, click ‘Add to Playlist’ under the player to add them to your list. You can change the order of the videos in your playlist by returning to the ‘My Playlist’ page.
    3. The easiest way to embed a playlist is to create a custom player. Go to your YouTube account and click “Custom Video Players”, then “Create Custom Player”. Select a color and format for your player, and then choose what is going to play in it—you can choose a playlist, your own uploaded content, or your favorites—and then click the “Generate Code” button.
    4. Copy and paste the code into your blog entry or web page, just as you did with the embedded video above

  4. Pat says:

    Gracias!! Worked like a charm.

  5. Brad says:

    I made a site that lets you search for youtube vids, play them, link them, and loop them. You can also loop playlists, then add other videos into the mix, and change their order on the fly. Then you can save those loops as new playlists on youtube, given that you have a youtube account..


    just thought i’d share – it was made more for those who like to use youtube for music playback, but you can use it for any youtube video.

  6. jorel314 says:


    Looks sweet! I’ll be sure to play around with it.

  7. kj says:

    any idea how to make a chromeless looping playlist player?

  8. TJ says:

    I use http://www.infiniteyoutube.com to loop single videos, it’s very easy to do.

    In the address bar, add the word “infinite” before the word “youtube”. This is the easiest way to put Youtube videos on loop. When you are finished your address bar should be changed from:



    You can also go to http://www.infiniteyoutube.com and just paste in a link to the video or even search for videos.

  9. Ray says:

    infiniteyoutube.com is awesome!

    I highly recommend it to anyone trying to loop youtube videos…

  10. Rondiu says:

    You can loop a single YouTube video using EZ Looper @ http://www.ezlooper.com
    By far the easiest looper around…

    Also, a Firefox addon available at: http://addons.mozilla.org/en-us/firefox/addon/youtube-auto-replay-11636
    And a Chrome extension available at: http://chrome.google.com/webstore/detail/mcdpnidfhfjfbafmpppcplcejgepadbo

  11. Caitlin says:

    Worked the first time! That almost NEVER happens!! :-) Thank you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s