Importing XML format playlists (that you previously exported from old versions of macOS/Apple Music/iTunes) into Apple Music app

If you have playlists that do not appear, are empty or missing tracks in Apple Music on macOS Monterey, try this:


  1. Apple Music app, select a playlist that is in your current sidebar of playlists on your Mac. Then select top menu File>Library>Export Playlist.
  2. Open Finder. Navigate to /Macintosh HD/Users/<YOURUSERNAME>/Music/Music
  3. Right click the XML file you have just exported e.g. 80sWonders.XML. Select "Open With" then select Text Edit app
  4. The 12th line down, you will see this string: <key>Music Folder</key><string>file:///Users/yourname/Music/Music/Media.localized/</string>
  5. Highlight and cut this string (CTRL + C keys)
  6. Next, open a new Finder window (Finder>File>Open New Finder Window).
  7. In this new finder, locate the playlist that you exported from previous versions of macOS/Apple Music app (e.g. 80sWondersold.xml).
  8. Right click on this file, Select "Open With" and then select Text Edit app
  9. Again on the 12th line, you will find a string something like this: <key>Music Folder</key><string>file:///Users/yourname/Music/Music/Media.localized/</string>.
  10. Select this string, and replace it with the sting that you cut above (CTRL + V keys)
  11. In the top menu of the Text Edit app, Select File>Duplicate
  12. In the top menu of the Text Edit app, Select File>Save
  13. Enter a filename that you want the playlist to be called e.g. 80sWonders
  14. Make sure in the Plain Text Encoding box that Unicode UTF-8 is selected (should be the default)
  15. In the drop down, save that file to Macintosh HD/Users/<YOURUSERNAME>/Music/Music. If you cannot see this folder in the pop up dialogue box which appears when you select File>Save, press the little down arrow "v" next the folder field (this will expand the whole dialogue box so you can see, navigate to a select all of you folders.
  16. Quit the Text Edit app
  17. In the Apple Music app, select top menu File>Import
  18. In the pop up dialogue box, select the XML file you have just edited e.g.80sWonders
  19. You should now have that playlist with all of the songs in it that were in the previously exported version.
  20. If not my email address is in my profile.


iMac 27″, macOS 12.0

Posted on Nov 27, 2023 03:18 PM

Reply

Similar questions

2 replies

Dec 18, 2023 03:23 PM in response to orence1966

Thank you for posting this helpful guide. It will come in useful given that I never made use of an iPhone with iTunes until recently because the internal capacity was too low. Recently I upgraded iPhones to resolve this — and to use my iPhone like I once used an iPod Photo — only to run into problems because of how outdated my library location is in an old version of iTunes.


I mistakenly concluded it was enough to move my iTunes library from SL to High Sierra only to realize I probably should have brought it into the current app now that iTunes is no longer supported under macOS. Am I out of luck or do I need to move the library into the Music app first?


At issue is that my current iPhone is on iOS 17.2 and cannot be seen via a USB connection by any Mac/iTunes. (Apparently iOS 17 broke connectivity between iTunes and iPhone for a lot of people but I'm at a double disadvantage since I wasn't syncing a phone with iTunes prior to 17.2.) Consequently, I am using a third-party app called iMazing to try to port my music over — only to run into the issue that my playlists aren't transferring successfully.


In iMazing under HS, I am given an option to "import from Folder", "Export to iTunes" or "Export to Folder". I selected "import from Folder" to move my iTunes Music folder to the phone, only to realize the playlists were omitted. I then went into iTunes (12.8) and exported each playlist as an XML file. I'm assuming it should be possible to make use of the XML playlist files in Music — but when I go to the folder where the XML playlist files were saved they are grayed out, implying that iMazing won't allow me to import them into the Music app on my iPhone. (BTW, I visited the iMazing tutorial but it must not be for the version that runs under HS because they assume that when the library is imported the playlists will come with it, which in my case did not happen.)


Any suggestions?



Feb 5, 2024 11:22 AM in response to orence1966

I have a slightly different problem. My sister has a MacBook running Big Sur 11.7.10, and an iPad running 16.6.1 (which cannot be upgraded due to space issues). She added some CD albums to her MacBook and wants to transfer them to her iPad. Her MacBook and iPad are NOT in sync, and she has more in her iPad library.


We went into Music on her MacBook and wanted to export these albums. But it would only let us export the entire library, not individual selections (the option was grayed out -- I don't know why.) We were able to create a library.xml file of the entire library, but we don't want to try it in case it wipes out what she already has on her iPad. So that's my first question: will it really sync them both together properly, or overwrite the iPad?


And if they will truly sync, do we use your instructions above to load the .XML file into the iPad?


Appreciate any help you can give.


Thanks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Importing XML format playlists (that you previously exported from old versions of macOS/Apple Music/iTunes) into Apple Music app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.