Add a Spotify Play Button to your blog, website, or social page—all your fans have to do is hit “Play” to enjoy the music.

Note: By using the Spotify Tools, you accept our Developer Terms of Use.

Spotify Play Buttons can be added to any webpage that supports <iframe> tags. You can create Play Buttons for albums, tracks, artists, or playlists.

When a logged-in Spotify user clicks the button, the music will start playing in the Spotify player. If the user is not logged into their Spotify account, the Spotify Play Button will play a 30-second audio preview of the music, and they will be prompted to login or sign up.

Follow the steps below and you’ll have your site singing in seconds.

You can choose different button themes and sizes, and you can link to any song or album in our music catalog, or to any playlist that you have created. (Note that we do have a few Terms of Use that we need you to comply with.)

Get the Code

  1. Right-click any song, album or playlist in the Spotify player and select “Copy Track Link” or “Copy Spotify URI”:
    select-track-link
  2. Paste the link or URI in the field below:
    (For example, spotify:track:2TpxZ7JUBn3uw46aR7qd6V or http://open.spotify.com/track/2TpxZ7JUBn3uw46aR7qd6V.)
  3. Copy the code below and paste it on your website.

Preview

Options

Size:

xpixels

xpixels
Theme*:
View*:
* Custom themes and views are only available for Spotify URIs to albums, artists or playlists; and only in the Large widget size.

Available parameters

ParameterValueLargeCompactDefaults
uriValid Spotify URI or HTTP link
themeblack, whitexblack
viewlist, coverartxlist

Examples

<iframe src="https://open.spotify.com/embed?uri=spotify:track:5JunxkcjfCYcY7xJ29tLai"
        frameborder="0" allowtransparency="true"></iframe>

<iframe src="https://open.spotify.com/embed?uri=spotify:user:erebore:playlist:788MOXyTfcUb1tdw4oC7KJ&view=coverart"
        frameborder="0" allowtransparency="true"></iframe>

<iframe src="https://open.spotify.com/embed?uri=spotify:user:erebore:playlist:788MOXyTfcUb1tdw4oC7KJ&theme=white"
        frameborder="0" allowtransparency="true"></iframe>

<iframe src="https://open.spotify.com/embed?uri=spotify:user:erebore:playlist:788MOXyTfcUb1tdw4oC7KJ&theme=white&view=coverart"
        frameborder="0" allowtransparency="true"></iframe>

Note: The iframe attributes allowtransparency="true" and frameborder="0" are required for the button to render correctly.

Player min/max sizes

You specify the height and width of the player by setting the height and width properties of the iframe.

Player sizeHeightWidth
Minimum size80px250px
Maximum size720px640px

What kind of player is rendered?

The larger player will be rendered if the given height is 80 pixels greater than the given width. Otherwise the compact player will be rendered.

Examples

<iframe src="https://open.spotify.com/embed?uri=spotify:user:erebore:playlist:788MOXyTfcUb1tdw4oC7KJ"
        width="250" height="80" frameborder="0" allowtransparency="true"></iframe>

<iframe src="https://open.spotify.com/embed?uri=spotify:user:erebore:playlist:788MOXyTfcUb1tdw4oC7KJ"
        width="300" height="380" frameborder="0" allowtransparency="true"></iframe>

Frequently Asked Questions about Spotify Play Button

Adding Spotify Play Buttons on other sites

Can I add a play button on my Facebook, Twitter, WordPress, Tumblr… page?

You can find instructions on how to add our widgets to popular sites on Adding widgets to websites.

Controlling through Javascript

Is there a JS SDK for the player? Can I send play/pause commands using Javascript?

The Play button doesn’t have any observable events, nor does it listen for any. Playback can only be triggered by the user clicking the button.
We’re certainly looking at creating a JS SDK; it’s a bigger project and right now we’re focusing on quickly releasing APIs to open up the general Spotify ecosystem (catalogue, playlists, etc).
None of these requests are falling on deaf ears, and we’re working hard to bring out as much functionality as we can.

Customizing the design

Is there any way of customizing the design of the Spotify Play Button? E.g. color, typography…

Currently there is no way no change the design of the Spotify Play Button.

Autoplay

Is there an auto-play option on the widget?

No, there is not. The user has to start playback by clicking on the Play Button, which will open the web player or desktop client to start the playback.

Embedding it in a hybrid mobile app

Is there a way to have this play button on the native iOS or Android app? maybe in a web view?

A Play Button is effectively only a “remote control” for the Spotify web client or the desktop client. If you want to embed audio playback in your mobile app, use the iOS or Android SDKs instead.

Playlists

The playlist rendered is not updated

Any changes you make to a playlist will be synced to your Spotify Play Button within minutes (max 10 mins).

The widget doesn’t render all the tracks within a playlist

We only show the first 200 tracks in any playlist.
A user’s playlist of starred tracks is currently not available.

I can’t find out how to sort the tracks within a playlist

The displayed order is the one in which they are arranged in the playlist for regular playlists, and the order in which they were added in the case of a user’s starred playlist. If you want to change the order in your regular playlists, open (for example) the Spotify Desktop Player and drag-and-drop your tracks into the order you require. Alternatively, you can programmatically reorder tracks through our Web API. See the endpoint for reordering tracks in a playlist.

Can I enable shuffle mode?

At the moment, there is no way to shuffle the playlist’s contents. Note that users can select “Shuffle” in their player after pressing the Play button.

I can’t see local tracks in the Play Button

Local files in playlists are not shown in the Play Button widget.

Other

I can’t use the Play Button’s UI to change the position of the currently playing track

Seeking is not supported by the Play Button.

Terms of Use

To protect users, content providers, the Spotify trademarks, our software and the Spotify service we require you to comply with our Spotify Widget Terms of Use.