Rentry (the platform where this guide is hosted) recently added popup ads to the site. They're not very intrusive, but they can mislead you to sketchy websites. Do NOT download anything from popups or ad banners.

Spotify to Youtube Music Guide

Import your Spotify's library into Youtube Music

If you want to patch Youtube Music to remove ads and enable screen-off playback, follow this APK patching guide with Revanced

The aim of this guide is to copy music from Spotify's library to YouTube Music's library, keeping the original order of songs. You can also use some third-party tools that are less technical but much more limited: Soundiiz lets you transfer music, but it is limited to 200 songs per transfer. You can manually select songs across multiple transfers, or use Skiley to split large playlists into smaller ones. To merge the transferred split playlists, open them in YouTube Music and use the Add to playlist function. To transfer Spotify's Liked Songs for free using Soundiiz, use Skiley to generate a copy and split it into smaller playlists, each with fewer than 200 songs. Additionally, you won't be able to save songs to YouTubeMusic's 'Liked Music' with these third-party tools unless you pay for Soundiiz Premium. If you're not satisfied with the result, you can delete ALL your YouTube likes and dislikes in one click (warning: this will also remove saved playlists you don't own) from the official My Activity page and start over.



Not the first time?

If you already did the setup and are in the project folder, you can skip Steps: 1, 2, 3, 4, 5 and 6.

  1. Make sure you are in the tool's directory. (It's the one where you see all the files).
  2. Open the Command Prompt: to do so, click the address bar of the tool's directory, type cmd and hit the Enter Key.
  3. Execute the command below (copy-paste and hit the Enter key).

    .venv\Scripts\activate

NotFirstTime Demo

  1. Go to Step7.

Setup Guide

You need a PC running Windows to do this. This also works on Mac, but that is not covered in the guide. Mac users can follow these instructions directly: https://github.com/F-l-a/Spotify2YTMusic/tree/main#setup-instructions

Step1: Get the tools

This is the tool that we will use to transfer the music.

  1. Go to https://github.com/F-l-a/Spotify2YTMusic.
  2. Click the Green Code button and select Download ZIP.
  3. Extract the archive. You can do this by right-clicking it and selecting Extract.
  4. Open the extracted directories. You are in the correct directory when you see all the files.

Download Tools Demo

Step2: Get Python

The tool is written in python. We need an interpreter to execute the script.

  1. Download the Python installer from the official Microsoft Store page.
  2. Open the installer. It will open the Microsoft Store App automatically.
  3. Install Python. The download should start automatically. A terminal-like window might open after installation; just close it.

    Alternatively:

    1. From its official Microsoft Store page, select View in Store.
    2. Install Python. A terminal-like window might open after installation; just close it.

If the installation fails, reboot the PC and try this step (Step2) again

Download Python Demo

Step3: Activate the Virtual Environment

A virtual Environment is an isolated space in which Python projects can be "executed".

  1. Make sure you are in the tool's directory. (It's the one with all the files extracted in the first step).
  2. Open the Command Prompt: to do so, click the address bar of the tool's directory, type cmd and hit the Enter Key.
  3. Execute one command at a time (copy-paste and hit the Enter key).
    python -m venv .venv 
    .venv\Scripts\activate
    

You should now see (.venv) at the beginning of the Command Prompt line. If you get errors, close the Command Prompt and try this step (Step3) again

Virtual Environment Demo

Step4: Install ytmusicapi and tk

ytmusicapi is a Python 3 library used to send requests to the YouTube Music API. tk (tkinter) is a Python library used to create Graphical User Interfaces in Python.

  1. In the virtual environment activated in the previous step, execute the command below (copy-paste and hit the Enter key).
    pip install ytmusicapi tk
    

The output should be Successfully installed with a bunch of names, or Requirement already satisfied. If you get errors, close the Command Prompt and return to Step2

ytmusicapi Demo

Step5: Get the headers

The tool uses the headers to login to youtube.

Don't share the headers with anyone: they can be used to log in on your behalf

  1. Go to https://music.youtube.com and login into your account.
  2. Right click, and select Inspect. Ctrl+Shift+J works too.
  3. Navigate to the Network tab and filter the list for "browse".
  4. Click something on the website, such as the Discover button. A network request filtered for "browse" should appear in the Network tab.
  5. Open that network request and select all the text under Request Headers. (There's a section for the Response Headers too. We don't need it. Make sure you select the Request) . Copy all the text with Ctrl+C or Right-click -> Copy.
  6. Open the file named raw_headers.txt in the directory of the tool extracted in Step1.3 with Notepad, and Paste the headers with Ctrl+V or Right-click -> Paste. Make sure the file is empty before pasting the new headers (delete any existing content if necessary).
  7. Save the changes with Ctrl+S or select File -> Save from the toolbar. You can then close the file.

Headers Demo

Step6: Generate the oauth.json file

OAuth stands for Open Authorization. This file contains the Authorization token used by the tool to login without username and password, and it's generated from the raw_headers.txt file.

  1. In the same terminal used in the previous steps, execute the command below (copy-paste and hit the Enter key).
    python spotify2ytmusic/ytmusic_credentials.py
    

The output should be YTMusic setup completed successfully!. If you get errors, return to Step5 and change browser. Delete the old headers from raw_headers.txt and Paste the new ones

Credentials Demo

Step7: Open the Graphical User Interface (aka: "the tool")

  1. In the same terminal used in the previous steps, execute the command below (copy-paste and hit the Enter key).
    python -m spotify2ytmusic gui
    

You can minimize the terminal, but do not close it.

A new app should be opened. See How to use the tool for instructions.

Gui Demo


How to use the tool

Graphical interface

GUI Image

The tool is divided into several modules/tabs: Login to YT Music, Spotify backup, Load Liked Songs, List Playlists, Copy all playlists, Copy a specific playlist, Settings.

  1. Login to YT Music
    This tab is not relevant: since we already have the oAuth.json file generated in Step6, the tool should log in automatically.
    • If the Console shows No file detected. Manual login required, close the tool and return to Step6.
  2. Spotify Backup - Mandatory
    Click the Backup button to get all your playlists from Spotify. A browser tab is opened to log into your Spotify Account. If the browser gets stuck loading the page infinitely or doesn't open at all, copy and paste the link you see in the console in a new browser tab.
  3. Load Liked Songs
    This transfers your liked songs from Spotify to YouTube. It may take some time, as each song is added by liking it on YouTube one by one.
    The console displays the progress, the current Spotify song and the one that it found and that it's liking on Youtube.
  4. List Playlists - Super useful combined with the "Copy a specific playlist" tab
    This lets you see all your playlists from Spotify and Youtube, with their names and IDs. An ID is an unique alphanumeric value that doesn't contain spaces. (Spotify's Liked Songs and YoutubeMusic's Liked Music don't have an ID).
  5. Copy all playlists - Not recommended
    This copies all your saved contents from Spotify. I strongly don't recommend it, as it also copies the playlists generated periodically by spotify, such as radios/mixes/suggestions (it copies all the playlists you saw in the "List playlists" tab). If you want to copy a specific playlist, use the next tab ("Copy a specific playlist").
  6. Copy a specific playlist - Your new best friend
    All your music can be managed from this screen.
    The process is simple: insert the Source playlist from Spotify, and the Destination one from Youtube.
    • Spotify Field: ID from the "List Playlists" tab, or - to use the Liked Songs.
    • Youtube Field: ID from the "List Playlists" tab, - to use the Liked Music, +PlaylistName to add the songs to an existing "PlaylistName" playlist (if there isn't a playlist with that name in your Youtube library, one will be created), or nothing (leave the field blank) to create a new playlist using Spotify's Source Playlist name.

    An ID is an unique alphanumeric value that doesn't contain spaces (For Example: PL_DhcdsaJ7echjfdsaJFhdsWUd73HJFca). Use the "List Playlists" tab to list the IDs of your playlists

  7. Settings
    Lets you disable the auto scrolling of the console. You can also change the Spotify-Youtube song matching algorithm, but I suggest using the default option (number 3). Algorithm number 1 should also work (though worse than 3). Do yourself a favor and avoid 0 and 2, they're awful.

Additional Information

While the tool runs, it logs useful information in a file created in the project directory: canzoniNO-MATCH.csv. This file contains information about song mismatches, skipped songs, the number of songs to be transferred, and the number of songs that were actually transferred. It is a .csv file that can be opened as a text file or a table. To open it as a table, you can use Excel or Google Sheets, but you may need to change the separator from ; to , in some cases. This can be done in Excel's settings.


Troubleshooting

  • There's no Cancel button. To stop any process the tool may be performing, just close the window. You can re-open the window with the command used in Step7.
  • The good old power off - power on is the best method to troubleshoot any issue.
Edit

Pub: 14 Jun 2025 21:44 UTC

Edit: 14 Jul 2025 10:45 UTC

Views: 88

Auto Theme: Dark