skip to content
JS John Sosoka

spotify-backup

Python script to export all Spotify playlists

GitHub →

spotify-backup

A Python script that exports all of your Spotify playlists, useful for paranoid Spotify users afraid that one day Spotify will go under and take all of our playlists with it!

Overview

This tool exports your Spotify playlists to a local file, giving you a backup of your music data. It supports both TSV (tab-separated) format for Excel and JSON format for programmatic use.

Features

Usage

Interactive Mode

Save the script and double-click it. It’ll ask you for a filename and then pop open a web page so you can authorize access to the Spotify API.

Command Line

Terminal window
# Export to TSV (Excel-compatible)
python spotify-backup.py playlists.txt
# Export to JSON
python spotify-backup.py playlists.json --format=json
# Include Liked Songs
python spotify-backup.py playlists.txt --dump=liked,playlists
# Use existing OAuth token
python spotify-backup.py playlists.txt --token=YOUR_TOKEN

JSCOM Edits

This fork includes the following additions:

Limitations

Future Plans