spotify_to_ytmusic: Moving Spotify Playlists and Liked Songs into YouTube Music
Copy playlists and liked music from Spotify to YTMusic
At a glance
- What is it?
- A Python CLI and Tk GUI that copies Spotify playlists and liked songs into YouTube Music by matching tracks through ytmusicapi. It is a local script with a browser-header login, not a hosted transfer service.
- Who is it for?
- Adopt it if you already run Python, are comfortable pasting raw browser headers into raw_headers.txt, and want a local script rather than a subscription transfer service. Skip it if you need a hosted, no-terminal option or an Android app, since the README describes only a desktop GUI and CLI.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 173 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 2, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What spotify_to_ytmusic Actually Moves
The repository is a set of scripts that copy liked songs and playlists from Spotify to YTMusic. It is aimed at someone who has decided to leave Spotify, or to run both services at once, and does not want to rebuild a library by hand. The unit of work is the playlist and the liked-songs list, not the audio. Nothing is downloaded or re-encoded, so the tool does not touch the question of converting Spotify tracks to MP3 files. It reads track metadata from Spotify and then searches YouTube Music for a match.
Three things are treated separately, and this matters when you plan a migration. Spotify liked songs are one list. Spotify liked albums live outside that list, and the README states that Spotify stores liked albums outside the Liked Songs playlist, which is why there is a separate command for them. Playlists are a third category, and copying all playlists explicitly does not copy the Liked playlist. A user who assumes one button moves everything will end up with an incomplete library.
How Matching and Copying Work Under the Hood
The tool depends on ytmusicapi for the YouTube Music side and a Spotify authorization step for the source side. The backup command helps you authorize access to your Spotify account, then writes the result to a JSON file. The README gives the shape of that call: python3 spotify_backup.py playlists.json --dump=liked,playlists --format=json. From that point the migration reads from the local JSON rather than hitting Spotify again.
On the YouTube Music side, authentication is not a username and password. You log in to YouTube Music in Firefox, open the browser inspection tool, filter the Network tab by /browse, copy the request headers in RAW form, and paste them into raw_headers.txt in the project directory. A script then converts that file into a credentials file. The GUI detects the file and logs in without prompting, printing File detected, auto login, and skipping the login tab entirely.
Track matching is a search, which is the part of the design most likely to surprise people. The README describes the process as displaying the Spotify song and then the YouTube Music song it found and liked, and the author notes spot-checking a couple hundred songs without a failure while warning that more esoteric titles may have issues. That is a search-based matcher, not a mapping table, so the failure mode is a wrong match or no match rather than a crash. Re-running copy_playlist or load_liked is described as safe and will not duplicate entries, which makes iterative correction practical.
Installing spotify_to_ytmusic and Running a First Copy
There is no pip package to install for the current version. The README instructs you to clone the repository, create a virtual environment, and install the dependencies directly. If you previously installed the package from the original repository, the first step is to remove it, for example python -m pip uninstall spotify2ytmusic on Windows or python3 -m pip uninstall spotify2ytmusic on Linux and Mac.
The clone and environment setup looks like this on Linux or Mac. On Windows the activate line is .venv\Scripts\activate instead.
git clone https://github.com/linsomniac/spotify_to_ytmusic.git
cd spotify_to_ytmusic
python3 -m venv .venv
source .venv/bin/activate
pip install ytmusicapi tkNext you need YouTube Music credentials. After pasting the copied /browse request headers into raw_headers.txt, run the credential script. The README notes that the resulting authentication file is picked up automatically by the GUI.
python3 spotify2ytmusic/ytmusic_credentials.pyBefore moving anything, list what exists on both sides. The README says this lists the playlists you have on Spotify and YTMusic so you can copy them individually, and the first column of that output is the playlist id you will need for a surgical copy.
python3 -m spotify2ytmusic list_playlistsIf the application was installed with its entry points, the same command is available as s2yt_list_playlists. Note that the README's command-line section contains a typo in one example, showing python -j spotify2ytmusic load_liked where the module flag should be -m. Use -m. For a first real migration, pick one small playlist and copy it by id rather than running the copy-all command.
python3 -m spotify2ytmusic copy_playlistThe raw_headers.txt Login Is the Weak Point
The authentication design is the most fragile part of this project and the release history shows it. Two consecutive releases, 0.9.31 and 0.9.32, are both described as fixes for ytmusic authentication changes. That is a maintenance cost you inherit: when YouTube Music changes how it authenticates, this tool needs a new release, and your local clone needs to be updated.
Pasting raw browser request headers into a file is also a manual, error-prone step. The headers include session material tied to your logged-in browser session, they expire, and the README does not document what to do when they stop working beyond regenerating them. There is no OAuth flow described for YouTube Music in the documentation, and no documented rollback for a bad migration. The README does state that re-running copy_playlist or load_liked is safe and will not duplicate playlist entries, which is the closest thing to an undo that the documentation offers.
The wrong-tool case is straightforward. If you want a browser-based service that handles the transfer without a terminal, or you want to move a library from an Android phone, this repository does not describe that path. It is a desktop Python tool with a Tk GUI and a set of CLI entry points.
How It Differs from Hosted Transfer Services
TuneMyMusic and Soundiiz are the names that come up most often when people search for this kind of transfer, and they take the opposite approach. They are hosted services: you authorize both accounts through their site and the transfer runs on their infrastructure, usually with a free tier that caps how many tracks you can move per transfer and paid tiers above it. Nothing is installed, and nothing runs on your machine.
spotify_to_ytmusic inverts that. There are no track caps in the documentation, no account on a third-party service, and no upload of your library to someone else's server. What you pay instead is setup work: Python, a virtual environment, a browser header copy, and a credentials file. You also carry the maintenance, because when YouTube Music changes its authentication the fix arrives as a new commit or release that you have to pull. A hosted service absorbs that breakage for you. The trade is control and cost against convenience and someone else's upkeep.
Licence and Upgrade Cost
The repository metadata marks the licence as NOASSERTION, while pyproject.toml declares license = "Creative Commons Zero v1.0 Universal" and the Briefcase configuration lists CC0-1.0. CC0 is a public domain dedication rather than a permissive software licence, which means the usual warranty and patent clauses you would find in MIT or Apache-2.0 are not present in the same form. That is a description of the files, not legal advice; if the distinction matters to your organisation, read the LICENSE file yourself.
The upgrade cost is concrete. Dependencies are pinned in requirements.txt, including ytmusicapi==1.9.1, while pyproject.toml asks for ytmusicapi = "*" and Python ^3.10. Those two files disagree about versioning discipline, so an install driven by the Poetry metadata can pull a newer ytmusicapi than the pinned requirements file was tested against. Given that two releases in February 2025 exist purely to fix authentication changes, pinning and testing deliberately is worth the effort. The last push to the repository was on 2026-04-13, so the project has moved since those releases, but the README does not describe what changed.
Editorial conclusion
Adopt it if you already run Python, are comfortable pasting raw browser headers into raw_headers.txt, and want a local script rather than a subscription transfer service. Skip it if you need a hosted, no-terminal option or an Android app, since the README describes only a desktop GUI and CLI. Before migrating a large library, verify the raw_headers.txt login flow still works against your account, run s2yt_list_playlists to see how your playlists are named on both sides, and test one small playlist with s2yt_copy_playlist before running s2yt_copy_all_playlists.
Frequently asked questions
How do I use spotify_to_ytmusic?
Clone the repository, create a virtual environment, and install ytmusicapi and tk. Paste your YouTube Music /browse request headers into raw_headers.txt, run spotify2ytmusic/ytmusic_credentials.py, then start the interface with python3 -m spotify2ytmusic gui or use the s2yt_ command line entry points.
Does spotify_to_ytmusic copy my Spotify liked songs as well as my playlists?
They are separate operations. The copy-all-playlists command explicitly does not copy the Liked playlist, so liked songs are handled by the load_liked command and liked albums by load_liked_albums, since the README notes Spotify stores liked albums outside the Liked Songs playlist.
Is re-running a spotify_to_ytmusic copy safe if it fails partway through?
The README states that re-running copy_playlist or load_liked is safe and will not duplicate entries on the playlist, so a failed run can be repeated.
Does spotify_to_ytmusic work without a terminal or on Android?
The project provides a Python CLI plus a Tk GUI started with python3 -m spotify2ytmusic gui, and no Android or hosted option is documented.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/linsomniac-spotify-to-ytmusic)