Spotify Embed Player: How to Add One to Your Page
Get the Spotify embed code, pick the right size, and put a player on your link-in-bio page. Includes preview limits and fixes for common problems.


A Spotify embed player is a small interactive player you paste onto a web page so visitors can listen to a track, album, playlist, artist or podcast without leaving. You copy a snippet of code from Spotify, then drop it into a page you control. If your page is a link-in-bio page, the easiest route is a builder that accepts provider embeds and music players and lets you edit from your phone, which is how we built shapes.
This guide covers where to find the code, which size to choose, what visitors actually hear, and how to fix the usual problems. It is written for freelancers, musicians, instructors and small business owners who want music on their page and would rather not touch a web developer’s toolbox.
TL;DR
- Copy the embed code from the Spotify desktop app or the Spotify web player. Spotify’s support page says embed code can’t be copied from the mobile app.
- Use a width of 100% and a height of 152 px for a single track, or 352 px for an album or playlist.
- Logged-out visitors hear a preview clip of about 30 seconds. Logged-in listeners can get more, so design your page around the preview.
- Keep the iframe’s allow=“encrypted-media” attribute, or playback is limited to previews.
- On a link-in-bio page, one embed near the top beats a long list of streaming links.
Table of Contents
- What a Spotify embed player is and what it can show
- How to get the Spotify embed code
- Choosing the right size
- What visitors will actually hear
- Putting a Spotify player on a link-in-bio page
- Fixing common problems
- Free or Pro: what you need for a Spotify page
- Start with a free page
- A quick checklist before you publish
- FAQ
- Sources
What a Spotify embed player is and what it can show
Spotify describes an embed as interactive content you can include on a compatible website or web application. You can create one for a podcast, episode, track, playlist, artist or album, and eligible tracks can include a music video.
Spotify’s own embed test page shows the full list of content types it supports: tracks, music video tracks, episodes, shows, audiobooks (US and UK), playlists, artists, albums and video embeds for shows and episodes. For most people reading this, three matter:
- A single track, such as your newest release or a song you want a client to hear.
- An album or playlist, such as a portfolio of your catalog, a class playlist or a mix for your studio.
- A podcast show or episode, for instructors and coaches who publish audio.
The embed is a frame. Your page controls where the frame sits and how big it is. Spotify controls what happens inside it, including how much of a song a visitor can hear.
How to get the Spotify embed code
The steps below follow Spotify’s developer tutorial:
- Open the Spotify web player or desktop app and find the track, album, playlist, artist or episode.
- Select the three-dot More options menu, then Share, then the option that begins with Embed.
- Adjust the color and size in the menu that appears.
- Copy the code.
- Paste it where your page accepts embeds, then save and publish.
For podcasts, Spotify’s creator support article adds that you can set a start time for an episode, and that embed code cannot be obtained from the mobile app or from Spotify for Creators. It also says only published episodes or videos can be shared. So even if you manage the rest of your page on your phone, plan to copy the code once from a computer, or from the web player in a desktop browser.
Spotify’s Embeds overview lists two other methods: an iFrame API for developers who want to load, play and pause content from their own code, and an oEmbed API for sites that handle user-shared links. You do not need either for a bio page. The copied snippet is enough.
What the code looks like
The snippet is an iframe, which is a web page window inside your page. Its address follows the pattern open.spotify.com/embed, then the content type (track, album, playlist and so on), then an ID. Two attributes deserve a glance before you paste:
- width and height decide the layout, covered below.
- allow=“encrypted-media” lets the player stream beyond a preview. Spotify’s troubleshooting page says embeds are limited to previews if this attribute is removed. If you paste the code in as is, you are fine. Problems start when a tool strips attributes or when you retype the snippet.
Choosing the right size
Size is the one customization that changes how your page feels. Spotify’s documentation gives four audio heights:
| Height | Layout | Best for |
|---|---|---|
| 352 px | Full player with artwork and track list | Albums and playlists |
| 152 px | Compact player | A single track, episode or show |
| 232 px | Legacy landscape | Avoid for new pages; Spotify suggests 152 or 352 |
| 80 px | Legacy compact with fewer controls | Avoid for new pages |
Source for all four: Spotify for Developers.
For width, Spotify says to set the iframe to 100% and place it in a container at least 280 pixels wide for audio. That matters most on a bio page, because nearly all visitors arrive on a phone. A fixed wide player can overflow a small screen, while a 100% width fits whatever the visitor holds.
The same menu lets you change the background color. Pick the one that sits well beside your page colors, since the player is the one block you cannot restyle freely.

Music videos
If your track has an eligible music video, Spotify says the iframe needs to be at least 250 px wide and 150 px high to show video. Smaller sizes fall back to audio or a link to open the track in Spotify. The generated video embed defaults to 624 by 351 pixels, per the same tutorial. On a phone-width page, expect the player to scale down with the container.
What visitors will actually hear
This is where most disappointment comes from, so set expectations before you build the page.
- Spotify’s troubleshooting page says embeds may stream only a preview clip of under 30 seconds in some situations.
- Spotify’s 2018 newsroom post on the play button explains that a visitor who is not logged in hears a 30-second preview, then gets prompted to log in or sign up.
- Embeds work best in Chrome, Firefox, Edge, Opera and Safari. In other browsers, Spotify says full songs and episodes may not play.
- Spotify’s creator guidance advises against preloading or autoplaying embedded audio on outside websites, because it can distort podcast stats. Let listeners press play.
In practice, treat the preview as the main experience. A 30-second clip is plenty to show a client your style, a studio’s vibe or the hook of a new single. Put your strongest section in the opening seconds of the track you embed, and add a clear button below the player for people who want the full release. The embed does the first impression; a plain link does the rest.
Putting a Spotify player on a link-in-bio page
A bio page is usually opened from a social profile, on a phone, by someone who will give it a few seconds. That shapes the decisions:
Lead with one player. Put your best single or your signature playlist near the top. A single compact 152 px player takes little vertical room and sits above the fold. A full 352 px album player is better lower down or inside a section of its own.
Pair it with the action you want. Under the player, place your booking link, your ticket link or your shop link. A visitor who likes what they hear should have a next step within one thumb scroll.
Use the right content type for the job.
- A musician: the newest track as a compact player, the album or a playlist of your catalog further down.
- A yoga or fitness instructor: your class playlist, so prospective students can hear the mood of your sessions. Pair it with your booking link.
- A podcaster or coach: the latest episode, with a link to the full show.
- A designer or filmmaker: a playlist that sets the tone of your work, placed next to a portfolio gallery.
Mind the clutter. One or two embeds is plenty. Every extra player pulls attention from the booking or portfolio link that earns you money. If you embed other things as well, such as an events calendar or social feed, see our guides on embedding Google Calendar and getting an Instagram embed code.
Where shapes fits
shapes is a phone-first, no-code builder, and its page can include music players and provider embeds alongside links for bookings, portfolios, shop links and events. You edit layout, colors, fonts and blocks directly on your phone, and the structure comes from blocks, folders and tabs rather than templates or drag-and-drop. That makes it practical to keep the Spotify player in one block, your booking link in the next, and a folder of extra releases tucked below. For musicians specifically, we describe the setup on our link in bio for musicians page.
If you have not built a page yet, our walkthrough on making a link-in-bio page on your phone covers the first steps, and the guide to what to put on your link-in-bio page helps you decide what deserves space around the player.
Fixing common problems
The player only plays a short clip. That is expected for logged-out visitors. Spotify says a visitor who is not logged in hears a preview and is then prompted to sign in. If even logged-in listeners get previews, check that the allow=“encrypted-media” attribute is still in the code. Spotify staff once replied on a GitHub issue that adding this attribute fixed full-track playback that had broken in some browsers.
The player is cut off or too wide on a phone. Set the width to 100% and make sure the container is at least 280 px wide, as Spotify advises. Avoid fixed widths copied from old tutorials.
It looks different from what you chose. Heights decide the layout. If you picked the full player but see the compact one, the height is probably below 352 px.
It will not load in a certain browser. Spotify says embeds work best in Chrome, Firefox, Edge, Opera and Safari. If a visitor reports trouble, ask which browser they are using.
You cannot find the embed option on your phone. For shows and episodes, Spotify’s support page says embed code is not available in the mobile app. Use the web player in a desktop browser, copy the code, and send it to yourself.
The code is rejected. Some tools accept only a link, not raw code. Paste the share link where a music block asks for one, and keep raw iframe code for fields built for custom code. On shapes, custom code embeds are part of Pro.

Free or Pro: what you need for a Spotify page
A free shapes account publishes a single page with shapes branding and limited features. That is enough to try a player on your page and see how visitors respond. Pro is $8 per month or $60 per year, and removes the branding, supports up to 5 pages, adds custom domains, analytics, downloadable signups, custom code embeds and advanced styling. A musician might use one page for releases, one for booking, and one for a specific tour or class series. See pricing for the current plan details.
Our view: the page around the player matters more than the player
We build shapes on one belief: most people who want a Spotify player do not need a website. They need a small, focused page that points to the right place at the right moment, and that they can fix from the couch when a release date changes.
A Spotify embed is a good example. It takes thirty seconds to copy the code, and the real work is deciding what sits next to it. A preview that lands is worth little if the visitor then has to hunt for your booking link. That is why we structure pages with blocks, folders and tabs: one block for the player, one for the action, and folders for everything else.
We also built shapes to be edited on a phone, because that is where creators and instructors notice things that need changing. Our approach is to connect the services you already use, such as Spotify, booking tools and shops, and keep your page focused on organizing them well.
Chris
Start with a free page
If you want a Spotify player on a page that also holds your booking link, portfolio and shop, build it in shapes. The free plan publishes one page, and Pro at $8 per month or $60 per year adds custom domains, analytics and up to 5 pages. Start on the shapes home page and add your player once you have copied the code from Spotify.

If you play shows, teach classes or take appointments, our pages for musicians and appointment-based work show how the pieces fit together.
A quick checklist before you publish
- Copy the embed code from the desktop app or web player, not from your phone.
- Choose 152 px for one track or episode, 352 px for an album or playlist.
- Set the width to 100%.
- Leave the allow=“encrypted-media” attribute in place.
- Pick a background color that matches your page.
- Do not autoplay. Let visitors press play.
- Add a visible booking, ticket or shop link right below the player.
- Open the live page on your phone, then in a second browser, and press play once in each.
FAQ
Can I embed a Spotify player from my phone?
Not the code itself. Spotify’s support page says embed code can’t be obtained from the mobile app. Copy it once from the desktop app or the web player in a computer browser. After that, you can place and edit the block on your page from your phone.
Why does my embedded Spotify player only play 30 seconds?
Spotify says a visitor who is not logged in hears a 30-second preview and is then asked to log in or sign up. Embeds can also be limited to previews if the allow=“encrypted-media” attribute is removed from the code. Keep the code intact and design your page around the preview.
What size should my Spotify embed be?
Spotify documents 152 px for a compact single track, episode or show, and 352 px for the full player used for albums and playlists. Set the width to 100% inside a container at least 280 px wide so it fits phone screens.
What can I embed from Spotify?
Spotify lets you embed tracks, albums, playlists, artists, podcasts and episodes, and eligible tracks can show a music video. Its embed test page also lists audiobooks in the US and UK and video embeds for shows and episodes.
Should I turn on autoplay?
No. Spotify’s creator guidance advises against preloading or autoplaying embedded audio on external sites, since it can distort podcast stats. Autoplay can also annoy visitors who open your page in public. A visible play button gives them control.
Sources
- Creating an Embed, Spotify for Developers
- Embeds, Spotify for Developers
- Troubleshooting, Spotify for Developers
- Spotify embed test page
- Sharing and embedding shows and episodes, Spotify Support
- How To Embed Spotify’s Play Button, Spotify Newsroom
- iFrame embed uri only playing preview in some browsers, spotify/web-api issue 916
Recommended
Make the page yours.
Build and preview for free. Choose a publishing plan only when you want the page live.