Spotify Playlist Cleaner: Whitelist, Deduplicate, and Interleave Tracks
Playlist curators manage hundreds of tracks across multiple playlists. According to Spotify's 2024 playlist engagement report, over 8 billion streams per week come from user-created playlists, and editorial playlists curated by Spotify staff account for a significant share of music discovery. Curators who maintain playlists with strict genre boundaries need tools that filter out off-topic tracks without manually reviewing every song. Our Playlist Cleaner does this in three steps: build an artist whitelist, clean the target playlist, and interleave tracks from a donor playlist.
Step 1: Build Your Artist Whitelist
The whitelist is the core of the cleaning process. You search for artists on Spotify and add them to a list stored in your browser's localStorage. The list persists across sessions, so you only need to build it once. When you clean a playlist, the tool checks each track's artist IDs against your whitelist. Tracks by artists not on the list get flagged for removal.
This approach works well for genre-specific playlists. If you run a jazz playlist, you add jazz artists to the whitelist. Any pop or hip-hop tracks that collaborators added get flagged automatically. The whitelist uses Spotify's Search for Item endpoint withtype=artist, which returns artist objects with stable IDs. Even if an artist changes their display name, the ID stays the same.
Step 2: Clean the Target Playlist
After selecting a playlist from your library or pasting a Spotify playlist URL, the tool fetches all tracks using the Get Playlist Items endpoint. As of February 2026, Spotify renamed this endpoint from /playlists/{id}/tracks to/playlists/{id}/items, and the response field changed from tracks toitems. The tool handles both field names for compatibility.
The cleaning preview shows two groups: tracks to keep and tracks to remove. Removal is driven by two filters. The whitelist filter flags tracks whose artist IDs do not match any whitelisted artist. The duplicate filter normalizes track names by stripping suffixes like (Remastered), (Live), - Radio Edit, and year markers, then compares the normalized name plus artist string. If a duplicate is found, the first occurrence is kept and subsequent copies are flagged.
Nothing is deleted until you click Confirm. The removal uses the Remove Playlist Items endpoint with position-aware deletion, sending each track's URI and its original position to avoid index shifting issues when removing multiple tracks in one call.
Step 3: Interleave Donor Tracks
The interleave feature pulls tracks from a donor playlist and inserts them between tracks in your target playlist at a fixed interval. You set the gap size with a slider: a gap of 3 means one donor track is inserted after every 3rd target track. Donor tracks already present in the target playlist are skipped to avoid duplicates.
This is useful for curators who maintain a core playlist and want to periodically inject fresh tracks from a discovery or submission playlist. The preview shows the full interleaved order with donor tracks highlighted, so you can verify the mix before applying. The apply step uses the Update Playlist Items endpoint (PUT /playlists/{id}/items) to replace the playlist's contents with the new order. For playlists over 100 tracks, the tool batches the update in groups of 100, matching Spotify's API limit.
Authentication and API Compliance
This tool requires four Spotify scopes: playlist-read-private and playlist-read-collaborative to load playlist contents, and playlist-modify-public and playlist-modify-private to remove tracks and update playlist order. Authentication uses the PKCE flow recommended by Spotify for browser-based applications. Your tokens are stored in sessionStorage and cleared when you close your browser tab. You can revoke access anytime from your Spotify account settings.
The tool uses the updated February 2026 playlist endpoints (/items instead of/tracks) and the new POST /me/playlists endpoint for playlist creation. The shared API wrapper handles rate limiting automatically, reading the Retry-After header on HTTP 429 responses and waiting before retrying. Search requests respect the current maximum limit of 10 results per call.
Related Tools for Playlist Management
For broader playlist maintenance, use our Playlist Manager to find duplicates across any playlist, sort tracks by various criteria, and export your Liked Songs. The Playlist Builder creates new playlists from pasted text lists or CSV files, which pairs well with the cleaner when you want to import a batch of songs and then filter them by whitelist. To see which tracks you listen to most, try the Spotify Stats tool for top tracks and artists across three time ranges.