I've been reading some posts here and elsewhere about how to import iTunes playlists (not the whole library) into Spotify. Found some good suggestions about using some third-party tools. My favorite was
But, it's a pretty generic importer, and it doesn't take the iTunes export format, without some modifications. So, here are the steps I'm using, and I've gotten very good results, so I thought I'd share, in case this helps others.
iTunes -> File -> Library -> Export Playlist
Choose the M3U format (this is important!)
In Terminal (Mac) or DOS, go to the M3U file location, and run the command below on the file.Copy the output.
Double-check that they selected the right songs (from the right albums).
Here's the command I use. Just replace "playlist.m3u" with the actual name of the M3U playlist you exported from iTunes:
cat playlist.m3u | tr -s "\r" "\n" | grep EXTINF | sed -e "s/#EXTINF:[0-9]*,//" | sed -e "s/\(.*\) - \(.*\)/\2 - \1/" | sed -e "s/ \[Explicit\]$//"
This works in Mac or Windows, although you might need to install some basic UNIX commands in Windows (cat, sed, and tr), but these are available in many places (just Google for UNIX utils for Windows).
This only works if you still have access to the MP3 files in your iTunes playlist. If you've lost these, then musconv.com will read the XML of your iTunes library and then export to Spotify. It's a paid service but it's not expensive.