Spotify Embed Generator

Paste a Spotify link to a track, album, playlist, artist or podcast episode and get a free player you can put on your website — no sign-up needed.
A track, album, playlist, artist, podcast or episode link (spotify: URIs work too), e.g. https://open.spotify.com/playlist/…Want your own audio player with your playlist?

Embed the player

<iframe src="https://open.spotify.com/embed/track/4uLU6hMCjMI75M1A2tKUQC?utm_source=generator" title="Spotify player" width="100%" height="352" style="border:0;border-radius:12px;" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
<p style="margin:4px auto 0;text-align:center;font:11px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#a3a7b0;">Created with <a href="https://elfsight.com/tools/spotify-embed-generator/" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;">Elfsight</a></p>

  1. Click Copy code above to copy it.
  2. Open the page’s HTML file or template.
  3. Paste the code inside <body>, where the content should appear.
  4. Save and upload the page, then open it in a browser to check.

Want your own audio player with your playlist and branding? Try the Audio Player widget. See Audio Player →

Before you go

Want your own audio player with your playlist and branding? Try the Audio Player widget.

See Audio Player →
Or share this free tool:
Audio Player widget

Your own audio player, with your playlist

Share releases, audio shows or lectures from one player on your site. It supports sources like SoundCloud, YouTube, Vimeo and Google Drive, and files you upload.
  • Tracks from SoundCloud, YouTube, Google Drive and more

  • Upload files or add them by link

  • Music plays right on your site

Spotify Embed Generator vs Spotify’s Share → Embed

Spotify’s own embed menu works well when you have the desktop app or the web player open. The generator starts from a link, so you can make the code from anywhere.
Spotify’s Share → Embed
This generator
On a phone
The Spotify mobile app doesn’t give you embed code.
Works with a link copied from the mobile app.
Content types
Track, album, playlist, artist, podcast show and episode.
The same six types, detected from the link.
Messy links
Not an issue: you start from the item itself.
Removes the ?si= share parameter and language parts like /intl-de/ from pasted links.
Size and color
Color and size options in the embed menu.
Normal or compact height, and a color theme.

On a phone

Spotify’s Share → Embed

The Spotify mobile app doesn’t give you embed code.

This generator

Works with a link copied from the mobile app.

Content types

Spotify’s Share → Embed

Track, album, playlist, artist, podcast show and episode.

This generator

The same six types, detected from the link.

Messy links

Spotify’s Share → Embed

Not an issue: you start from the item itself.

This generator

Removes the ?si= share parameter and language parts like /intl-de/ from pasted links.

Size and color

Spotify’s Share → Embed

Color and size options in the embed menu.

This generator

Normal or compact height, and a color theme.

Spotify embed options

What you can set in the embed code, and what each content type gives you.
Option
What it does
Values
Notes
Content
What the player shows: one song, a collection or a podcast.
Track, album, playlist, artist, show, episode
Detected from the link. A track with an eligible music video shows the video automatically, with the same embed code.
Height
How tall the player is.
Normal (352 px) or compact (152 px)
Compact suits a single song or episode in a narrow space. Normal gives albums, playlists and artists more room.
Width
How wide the player is.
100% by default
At 100% the player fills its container and adapts to phones.
Theme
The player’s color scheme.
Default or dark
Spotify’s own embed menu offers the same kind of color choice.
allow
Grants the player the browser features it needs.
autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture
This is what Spotify’s own code uses. Keep encrypted-media: without it, the player only plays previews.
loading
When the browser loads the player.
lazy
The player loads when a visitor scrolls near it, so the rest of the page loads faster.

Content

What it does

What the player shows: one song, a collection or a podcast.

Values

Track, album, playlist, artist, show, episode

Notes

Detected from the link. A track with an eligible music video shows the video automatically, with the same embed code.

Height

What it does

How tall the player is.

Values

Normal (352 px) or compact (152 px)

Notes

Compact suits a single song or episode in a narrow space. Normal gives albums, playlists and artists more room.

Width

What it does

How wide the player is.

Values

100% by default

Notes

At 100% the player fills its container and adapts to phones.

Theme

What it does

The player’s color scheme.

Values

Default or dark

Notes

Spotify’s own embed menu offers the same kind of color choice.

allow

What it does

Grants the player the browser features it needs.

Values

autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture

Notes

This is what Spotify’s own code uses. Keep encrypted-media: without it, the player only plays previews.

loading

What it does

When the browser loads the player.

Values

lazy

Notes

The player loads when a visitor scrolls near it, so the rest of the page loads faster.

Spotify for Developers: Creating an Embed ↗

Common Spotify embed problems

Only a short preview plays.

In some situations Spotify streams a preview clip of less than 30 seconds instead of the full song. Visitors who aren’t logged in to Spotify in their browser hear a preview and are asked to log in or sign up. You can’t change this from the embed code.

Only previews play, even for logged-in visitors.

Check that allow="encrypted-media" is still in the iframe. Some site builders and plugins strip attributes; without this one, Spotify only plays previews.

Full playback doesn’t work in some browsers.

Spotify lists Chrome, Firefox, Edge, Opera and Safari as the best-supported browsers. In others, full songs and episodes may not play in the embed.

The player doesn’t start on its own.

Browsers such as Safari block autoplay until the visitor interacts with the page. Spotify also recommends not autoplaying podcasts on external sites, to keep listening stats accurate.

You can’t find the embed option on your phone.

The Spotify mobile app doesn’t provide embed code. Copy the share link in the app and paste it here, or use the desktop app or the web player.

The player disappears after you save the page.

Some editors remove iframes from regular text blocks. Paste the code into a custom HTML or embed block.

How to embed Spotify on a website

  1. Copy the Spotify link

    In Spotify, choose Share → Copy link on a track, album, playlist or episode.

  2. Choose the player

    Paste the link and pick the compact or full player and the theme.

  3. Paste the code

    Add the code to an HTML block on your page.

Frequently asked questions

More Embed Code Generators

iFrame Generator

Build a responsive iframe for any page, form or app.iFrame Generator