Where Safari Stores History.db and Bookmarks.plist on macOS

This article provides the exact file system locations for the Safari web browser's History.db SQLite database and Bookmarks.plist file on macOS. Additionally, it covers the straightforward steps required to access this hidden directory via Finder or the Terminal, as well as how to resolve the default macOS privacy permissions that restrict direct access to these specific user files.

The Exact File Locations

Safari stores both its browsing history and bookmarks data inside the current user's hidden Library folder.

The base directory is: ~/Library/Safari/

Depending on your macOS username, the full absolute path on the file system is: /Users/<YourUsername>/Library/Safari/

Within this directory, you will find both files:

  • Browsing History: ~/Library/Safari/History.db
  • Bookmarks and Reading List: ~/Library/Safari/Bookmarks.plist

How to Access the Files via Finder

Because macOS hides the user Library folder by default to prevent accidental modifications, you cannot simply click through your home folder to find it. Follow these steps to go directly to the folder:

  1. Open Finder.
  2. Press Command + Shift + G on your keyboard to open the "Go to Folder" dialog box.
  3. Type ~/Library/Safari/ and press Return.

Alternatively, you can open Finder, click on the Go menu in the top macOS menu bar, and hold down the Option (Alt) key. This will reveal the hidden Library option in the dropdown menu. Click it, then navigate to the Safari folder.

Bypassing macOS Permission Restrictions

On modern versions of macOS, the ~/Library/Safari/ directory is protected by macOS Transparency, Consent, and Control (TCC). If you attempt to access History.db or Bookmarks.plist using the Terminal or a third-party database viewer, you will likely encounter an "Operation not permitted" error.

To read or copy these files, you must grant Full Disk Access to the application you are using to access them:

  1. Open System Settings (or System Preferences on older macOS versions).
  2. Navigate to Privacy & Security.
  3. Scroll down and select Full Disk Access.
  4. Click the + icon at the bottom of the list (you may need to authenticate with your password or Touch ID).
  5. Add the Terminal app (or your preferred SQLite browser/text editor) to the list and ensure the toggle switch next to it is turned on.
  6. Restart the application you just granted access to.

Important File Handling Notes

If you plan to copy or parse these files, keep the following technical behaviors in mind:

  • History.db Write-Ahead Logging: While Safari is open, you will also see History.db-shm and History.db-wal in the same folder. Safari uses SQLite Write-Ahead Logging, meaning the most recent history entries are stored in the -wal file before being committed to the main .db file. Completely quit Safari (Command + Q) before copying History.db to ensure all recent data is merged into the main database file.
  • Bookmarks.plist Formatting: The Bookmarks.plist file is compiled as a binary property list, meaning it will look like gibberish if opened in a standard text editor. To read it as standard XML, copy the file to your Desktop, open Terminal, and run the command: plutil -convert xml1 ~/Desktop/Bookmarks.plist.