KIRA WRITES

How to Embed Spotify Playlist in Your Website

Major props to Spotify dev team making it soooo easy to embed playlists on your website. All you need to do is: Go to playlist > Open 3 dot Menu > Share > Copy Embed Codescreenshot of the spotify playlist terminal with menu expanded and copy embed code highlighted

An alert will pop up saying the code has been copied. screenshot of spotify 'agree to terms' alert

As an example, my playlist’s URL came out like this:

<iframe src="https://open.spotify.com/embed/playlist/18diZIkAwyI8FWrlV1GfvJ" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>

Then, embed this code in your html or JSX! You should see the the following widget appearing on your website!

screenshot of spotify widget

You are done!

Note that for visitors on your site “who are not logged in on their Spotify account, the Spotify Play button plays a 30-second long audio preview, and then the users are prompted to either login or to sign up.” Check Spotify’s official documentation on Play Widget for more details.