Safari, Apple's popular web browser, has a lot going for it. It's easy to use, fast, and versatile, and it adheres to web standards. It does, however, have one slightly annoying feature, or should I say it lacks a feature: a convenient way to import and export bookmarks.
Yes, there are 'Import Bookmarks' and 'Export Bookmarks' options in the Safari File menu. But if you have ever used these Import or Export options, you probably didn't get what you expected. The Import option brings your bookmarks into Safari as a folder full of bookmarks that can't actually be accessed from the Bookmarks menu or from the Bookmarks Bar. Instead, you have to open the Bookmarks manager, sort though the imported bookmarks, and manually put them where you want them.
If you want to avoid this tedium, and be able to back up and restore your Safari bookmarks without the import/export and sorting hassle, you can. Likewise, this method of directly manipulating Safari's bookmark file will allow you to move your Safari bookmarks to a new Mac, or take your Safari bookmarks with you wherever you go and use them on an available Mac.
Safari Bookmarks: Where Are They?
Safari 3.x and later all store the bookmarks as a plist (property list) file named Bookmarks.plist, located at Home Directory/Library/Safari. Bookmarks are stored on a per user basis, with each user having their own bookmarks file. If you have multiple accounts on your Mac, and want to back up or move all of the bookmarks files, you will need to access Home Directory/Library/Safari for every user.
Where Did You Say That Library Folder Was?
With the advent of OS X Lion, Apple started hiding the Home Directory/Library folder, but you can still access the folder with either of the two tricks outlined in How to Access Your Library Folder on Your Mac. Once you gain access to the Library folder, you can proceed with the instructions below.
Backup Safari Bookmarks
To back up your Safari bookmarks, you need to copy the Bookmarks.plist file to a new location. You can do this in one of two ways.
- Open a Finder window and navigate to Home Directory/Library/Safari.
- Hold down the option key and drag the Bookmarks.plist file to another location. By holding down the option key, you ensure that a copy is made, and that the original stays in the default location.
The alternate way to back up the Bookmarks.plist file is to right-click the file and select 'Compress "Bookmarks.plist"' from the pop-up menu. This will create a file named Bookmarks.plist.zip, which you can move anywhere on your Mac without affecting the original.
Restoring Your Safari Bookmarks
All you need to restore your Safari bookmarks is to have a backup of the Bookmarks.plist file available. If the backup is in the compressed or zip format, you will need to double-click the Bookmarks.plist.zip file to decompress it first.
- Quit Safari if the application is open.
- Copy the Bookmarks.plist file you backed up earlier to Home Directory/Library/Safari.
- A warning message will display: "An item named "Bookmarks.plist" already exists in this location. Do you want to replace it with the one you're moving?" Click the 'Replace' button.
- Once you restore the Bookmarks.plist file, you can launch Safari. All your bookmarks will be present, just where they were when you backed them up. No importing and sorting required.
Moving Safari Bookmarks to a New Mac
Moving your Safari bookmarks to a new Mac is conceptually the same as restoring them. The only difference is you will need a way to bring the Bookmarks.plist file to your new Mac.
Because the Bookmarks.plist file is small, you can easily email it to yourself. Other options are to move the file across a network, put it on a USB flash drive or an external hard drive, or store it in the cloud, on an Internet-based storage solution such as Apple's MobileMe. My preference is a USB flash drive, because I can take it with me everywhere and access my Safari bookmarks whenever I need them.
Once you have the Bookmarks.plist file on your new Mac, use the steps outlined in 'Restoring Your Safari Bookmarks,' above, to make your bookmarks available.
Using Safari Bookmarks on Other Macs or PCs
If you travel a lot, or you like to visit friends or family and use their Mac or PC while you're there, you may want to bring along your Safari bookmarks. There are multiple ways to do this; one method we won't go into is to store your bookmarks in the cloud, so you can access them from anywhere you have an Internet connection.
We started out by disparaging Safari's import/export capabilities, but there is one time when the export function is quite useful. That's when you need to access your bookmarks from a public computer, such as those found at libraries, business locations, or coffee houses.
When you use Safari's Export Bookmarks option, the file Safari creates is actually an HTML listing of all of your bookmarks. You can take this file with you and open it in any browser, just like a normal web page. Of course, you don't end up with bookmarks per se; instead, you end up with a web page that has a clickable list of all of your bookmarks. Though not as easy to use as the bookmarks in a browser, the list can still come in handy when you're on the road.
Here's how to export your bookmarks.
- Launch Safari.
- Select File, Export Bookmarks.
- In the Save dialog window that opens, select a target location for the Safari Bookmarks.html file, and then click the 'Save' button.
- Copy the Safari Bookmarks.html file to a USB flash drive or to a cloud storage system.
- To use the Safari Bookmarks.html file, open a browser on the computer you're using and either drag the Safari Bookmarks.html file to the browser's address bar, or select Open from the browser's file menu and navigate to the Safari Bookmarks.html file.
- Your list of Safari Bookmarks will display as a web page. To visit one of your bookmarked sites, just click the corresponding link.