Everywhere All articles Download Buy — $19

Where apps hide your files

Safari's bookmark and history files

Updated 2026-10-28 · 7 min read

Safari's bookmarks, history and tabs are plain files in your Library, but macOS blocks apps from reading them by default. Here are the exact names, the permission step, and Safari's own export, which now covers history too.

The location

~/Library/Safari/

The two files most people want are in there:

~/Library/Safari/Bookmarks.plist
~/Library/Safari/History.db

Bookmarks.plist holds bookmarks, the Reading List and the Favorites folder. History.db is a SQLite database of visited pages. Both, and the files below, were checked on a Mac running Safari 26.2 on macOS 15 Sequoia.

What else is in the folder

ItemWhat it is
History.db, History.db-wal, History.db-shmHistory database and its write-ahead files. Keep the three together
Bookmarks.plistBookmarks and Reading List
AutomaticBookmarksBackup.htmlAn occasional HTML backup of your bookmarks
Downloads.plistThe list behind the Downloads popover (the downloaded files are elsewhere)
TopSites.plistFrequently visited sites for the start page
LastSession.plist, RecentlyClosedTabs.plistTabs to restore and the Reopen Closed Tab list
Favicon Cache/Site icons
LocalStorage/Data that sites store in the browser
CloudTabs.db and other *.db filesiCloud tab and sync bookkeeping

Tab groups live in Safari's sandbox container instead. On the Mac checked, SafariTabs.db sat here:

~/Library/Containers/com.apple.Safari/Data/Library/Safari/

If you use Safari profiles, note that Apple's export treats history and extensions as belonging to each profile, while bookmarks are shared. Apple does not document where per-profile files live on disk, so use the export below rather than hunting for them.

Why Terminal may say Operation not permitted

Since macOS Mojave, ~/Library/Safari is protected. Terminal reports Operation not permitted, and other apps that try to read it get nothing. To let Terminal read it, open System Settings > Privacy & Security > Full Disk Access, add Terminal, then quit and reopen it. Only grant this to apps you trust, since it opens your mail and messages too.

To open the folder in Finder, use Go > Go to Folder (⇧⌘G) and paste ~/Library/Safari.

Getting bookmarks and history out the supported way

Reading the files directly is the fallback. These are better:

  1. Everything at once: choose File > Export Browsing Data to File, pick the data types (bookmarks, history, passwords, credit cards, extensions) and a profile or all profiles. Safari saves a ZIP archive. Apple warns that it is unencrypted, so delete it once you have imported it elsewhere.
  2. Bookmarks only: File > Export > Bookmarks still writes a single HTML file that other browsers import.
  3. Reading List and tabs: these sync through iCloud, so a new Mac signed in to the same Apple Account with Safari turned on in iCloud settings gets them back.

If you copy History.db to examine it, quit Safari first and copy the -wal and -shm files with it. Opening the live file with another tool while Safari runs can lock it.

Space and cleaning

Safari's data is small. The whole ~/Library/Safari folder was about 14 MB on the Mac checked. The web cache is a separate folder, which was a few hundred kilobytes there because that Safari is rarely used:

~/Library/Caches/com.apple.Safari/

Inside it, WebKitCache is the part that grows. To clear history without touching files, choose History > Clear History and pick how far back to go. That is safer than deleting History.db, which Safari expects to exist, and if Safari uses iCloud the history is cleared on your other devices too. Do not delete Bookmarks.plist unless iCloud has a good copy: AutomaticBookmarksBackup.html is written only now and then, so check its date before you count on it.

Moving to a new Mac or backing up

Migration Assistant carries this folder across. Time Machine also backs up ~/Library/Safari, and you can restore single files from it. For a manual copy, quit Safari, copy Bookmarks.plist and the history trio, and place them in the same folder on the new Mac with Safari closed. Turning on iCloud sync for Safari is the least fragile choice for ongoing protection.

Why search misses it

Spotlight does not show results from ~/Library, and Safari's folder is further shielded by the privacy rules above, so "Bookmarks" or "History" searches find only the exported copies you made yourself.

Reading the history file safely

History.db is an ordinary SQLite database, so you can inspect a copy with the sqlite3 tool that ships with macOS. Work on a copy on your Desktop, never on the live file. The tables of interest are history_items (one row per address) and history_visits (one row per visit, with a timestamp). Safari stores times as seconds since 1 January 2001, not the usual Unix epoch, so dates look wrong until you add 978307200 seconds. These table names are long-standing, but check them with .tables on your own copy in case your version differs.

History is private. Anything you copy out of the folder carries every address you visited, so delete the copy when you are done.

Finding the files again

Everywhere matches file names, so typing History.db lists the live database next to any copies you made, and typing Bookmarks turns up Bookmarks.plist along with old HTML exports you forgot about. It needs Full Disk Access to see inside ~/Library/Safari, the same permission Terminal needs above, and it finds files without reading what is in them. ⌘↵ reveals a result in Finder.

Common questions

Where is the Safari bookmarks file on a Mac?

It is ~/Library/Safari/Bookmarks.plist. Safari also writes an occasional HTML backup beside it, AutomaticBookmarksBackup.html.

Where is Safari history stored?

In ~/Library/Safari/History.db, a SQLite database, with History.db-wal and History.db-shm beside it while Safari runs.

Why does Terminal say Operation not permitted for the Safari folder?

macOS protects it. Add Terminal under System Settings > Privacy & Security > Full Disk Access, then quit and reopen Terminal.

How do I export Safari bookmarks and history?

Choose File > Export Browsing Data to File and tick bookmarks and history; Safari saves a ZIP archive. For bookmarks alone, File > Export > Bookmarks writes an HTML file.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support