What Spotdl Does and Why You Might Want It
Spotdl is a command-line tool that downloads music from Spotify to your computer as audio files. It takes a Spotify track URL or playlist link, fetches the song from other sources, and saves it as an MP3 or other audio format you can play offline without a Spotify subscription. The tool runs through your computer's terminal or command prompt rather than through a graphical interface with buttons and menus.
People use Spotdl when they want to keep a permanent copy of music, build a music library they own outright, or listen to songs without needing an active internet connection or Spotify account. The downloaded files stay on your computer even if Spotify removes them or if your subscription lapses.
Key Takeaways
- Spotdl requires Python to be installed on your computer first, which you can download free from python.org.
- After Python is installed, you open your terminal or command prompt and type a single command to install Spotdl using pip, Python's package manager.
- To download a song, you paste a Spotify track URL into a terminal command and Spotdl fetches and saves the audio file to your computer.
- Downloaded files appear in your user folder by default, but you can change where Spotdl saves them by editing its configuration file.
Install Python First
Spotdl runs on Python, a programming language that your computer needs to have installed. Most computers do not come with Python pre-installed, so you will need to add it yourself. Go to python.org, click the large yellow "Download Python" button, and run the installer file that downloads.
During installation on Windows, check the box that says "Add Python to PATH" before you click Install. This step lets your computer find Python when you type commands later. On Mac, the installer handles this automatically. Once the installer finishes, close it and move on to the next step.
To confirm Python installed correctly, open your terminal (Mac) or command prompt (Windows), type python --version, and press Enter. You should see a version number like "Python 3.11.5". If you see an error instead, Python did not install properly and you should run the installer again.
Install Spotdl Using Pip
Pip is Python's package manager — a tool that downloads and installs add-ons for Python. It comes automatically with Python, so you do not need to install it separately. Open your terminal or command prompt and type this command exactly:
pip install spotdl
Press Enter and wait. Pip will download Spotdl and all the other programs it needs to run. This usually takes one to three minutes depending on your internet speed. You will see text scrolling down your screen as files download. When it finishes, you will see a line that says "Successfully installed spotdl" or similar. If you see an error about permissions, try typing pip install --user spotdl instead.
Download Your First Song
To download a song, you need its Spotify URL. Open Spotify, find a song you want, right-click it, and select "Copy Spotify URI" or "Share" and then "Copy Link". The link will look like https://open.spotify.com/track/[a long string of letters and numbers].
Go back to your terminal or command prompt and type:
spotdl download [paste the URL here]
Replace "[paste the URL here]" with the actual link you copied. For example: spotdl download https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp. Press Enter and Spotdl will search for the song, download it, and save it to your computer. This usually takes 30 seconds to two minutes per song.
When it finishes, you will see a message showing where the file was saved. By default, Spotdl saves files to a folder called "Music" in your user directory. The file will be named after the song and artist, like "Artist Name - Song Title.mp3".
Download Entire Playlists
Spotdl can download a whole playlist at once instead of one song at a time. In Spotify, right-click the playlist name, select "Share", and copy the link. The URL will look like https://open.spotify.com/playlist/[numbers and letters].
In your terminal, type:
spotdl download [paste the playlist URL here]
Spotdl will download every song in the playlist and create a folder with the playlist name. If the playlist has 50 songs, this will take 25 to 50 minutes depending on your internet speed. You can close the terminal and come back later — Spotdl will keep working in the background.
Change Where Files Save
By default, Spotdl saves all downloads to a "Music" folder in your user directory. If you want files to go somewhere else, you can change this by creating a configuration file. In your terminal, type:
spotdl --config
This creates a file called ".spotdl-config.json" in your user folder. Open it with any text editor like Notepad (Windows) or TextEdit (Mac). Find the line that says "output": "{artist}/{album}/{song-name}" and change the path. For example, to save to your Desktop, change it to "output": "Desktop/{artist}/{album}/{song-name}". Save the file and close it. From now on, Spotdl will save downloads to your Desktop instead.
Troubleshoot Common Problems
If Spotdl says "command not found" when you type spotdl, Python did not install correctly or was not added to your PATH. Restart your computer and try again. If the problem persists, uninstall Python completely, restart, and run the installer again, making sure to check "Add Python to PATH" on Windows.
If a song fails to download, Spotdl could not find it on any music source. Try a different song to confirm Spotdl is working, then try the failed song again later — sometimes sources are temporarily unavailable. If most downloads fail, check that your internet connection is stable and that you are not behind a firewall that blocks downloads.
If you see an error about "ffmpeg", Spotdl needs a tool called FFmpeg to convert audio files. On Windows, Spotdl usually installs FFmpeg automatically. On Mac, you may need to install it separately using Homebrew. Type brew install ffmpeg in your terminal if you have Homebrew installed, or visit ffmpeg.org to download it manually.
Frequently Asked Questions
Can I download songs from Spotify without Spotdl?
Spotify's official app does not let you download songs to keep permanently — it only lets Spotify Premium members download for offline listening within the app. Spotdl is one way to get permanent copies, but it requires using the command line.
Will Spotdl work on my phone or tablet?
Spotdl is designed for computers running Windows, Mac, or Linux. It does not work on phones or tablets. If you need to download music on a phone, look for other tools designed for mobile devices.
Is it legal to download music from Spotify using Spotdl?
The legality depends on your location and local copyright laws. In most places, downloading copyrighted music without permission violates the terms of service you agreed to with Spotify. Check your local laws and Spotify's terms before using Spotdl.
What audio formats can Spotdl save files in?
By default, Spotdl saves as MP3, which works on almost any device. You can change the format to WAV, FLAC, OGG, or other formats by editing your configuration file, but MP3 is the most compatible choice.
How much storage space do downloaded songs take up?
A typical three-minute song saved as MP3 takes about 3 to 5 megabytes of storage. A full album might take 50 to 100 megabytes. A large playlist with 100 songs could take 300 to 500 megabytes, depending on song length and audio quality.