Home > Mac Data Recovery Tips

3 Ways to Recover Deleted Safari History on MacBook (2024)

Updated on Monday, April 29, 2024

iBoysoft author Anna Yuan

Written by

Anna Yuan
Professional tech editor

Approved by

Jessica Shee


How to Recover Deleted Safari Browsing History on Mac?

Summary: This post mainly talks about how to recover deleted Safari history on Mac in 3 simple ways, including using the iBoysoft data recovery app, TimeMachine, and iCloud. Besides, it covers how to find and open Safari History.db files on MacBook.

recover deleted Safari history on Mac

Sometimes, to keep your Safari browsing history clean and to prevent others from examining your online activity, you may choose to delete Safari browser history. That's all fine until you need the address of a website you've visited before and can't remember it.

If you're looking for ways to recover the deleted Safari history on Mac, then this post will help you because it addresses the top 3 methods to retrieve deleted Safari history on Mac. In addition, it briefly explains what Safari browser history is and where you can find it.

How to recover deleted Safari history on Mac:

Recovering optionsEffectivenessDifficulty level
Use softwareHighEasy
Use Time MachineHigh if you've backed up before, Not Work if no backupsEasy
Use iCloudSimilar to using Time MachineEasy

What is Safari history?

Safari history is a database file that contains your previously visited websites. Just like most other web browsers, Safari keeps the history file automatically. So it is easier for users to revisit some websites to recover deleted apps on Mac without having to find and enter their addresses once again.

How to find and open Safari history on Mac?

Normally, there are two ways to view Safari history on Mac or MacBook. One is to check it in Safari. Another is to find the Safari History.db file in Finder.

Find history in Safari:

  1. Open Safari on your Mac. 
  2. On the menu bar, select the History option. 
  3. Click Show All History
    find Safari history on Mac 

Then, you'll see a table with two columns and multiple rows. The first column from the left shows the names of the websites you previously visited and these sites are sorted by date, while the second column shows their full addresses.

View the History.db file in Finder:

All the information that you can see when you click the Show All History button in Safari is stored on the Macintosh hard drive, which is named History.db. To find and open it, do the following:

  1. Open Finder. 
  2. Choose the Go option, click Go to Folder
  3. Type in ~/Library/Safari/ and click Go
    find Safari history.db file on Mac

Locate the History.db file, then you will find you can't open it with any built-in macOS app. It's a database file, you need to use a database browser like DB Browser for SQLiteto open it.

Here's how to open Safari History.db file:

After installing DB Browser for SQLite for free, launch the app. Then click Open Database and select the History.db file. Finally, switch to the Browse Data tab, select the history_items. You can see all the previously visited websites.

open Safari history.db file on Mac

With these two options, you can easily find your Safari history on MacBook. But what if you lost all the Safari history due to accidental deletion or intentional deletion to protect your privacy, is it possible to find them back?

How to recover deleted Safari history on Mac?

Fortunately, there are three main ways to recover deleted Safari history on Mac:

Method 1: Recover deleted Safari history with data recovery software

Using a data recovery tool is the simplest and quickest way to recover deleted files on Mac, including the deleted Safari history. iBoysoft Mac Data Recovery is a top-ranking, professional, and safe data recovery tool.

It helps recover deleted documents, emails, photos, videos, and other types of files from your Mac hard drive. Besides, it also allows recovering files from external hard drives on Mac. Thus, iBoysoft data recovery for Mac is perfect for recovering the History.db file that has been accidentally or intentionally deleted.

Just follow the steps below to recover deleted Safari history on Mac:

  1. Download and install iBoysoft Data Recovery for Mac on your Mac or MacBook. 
  2. Launch this app, select the macOS volume or the Macintosh HD volume, and click Scan
    launch iBoysoft Mac data recovery
  3. From the scanning results, find the deleted History.db file by typing “History.db” into the search field in the top-right corner and then hit the Return key. 
  4. Select the deleted History.db file and click Recover to save it to another destination.

You can then view deleted Safari history in DB Browser for SQLite. To view it in Safari, you need to copy the recovered History.db file to ~/Library/Safari folder and overwrite the file that's currently in the location.

Method 2: Recover deleted history on Mac Safari with TimeMachine backup

Time Machine is a built-in feature in macOS that enables you to back up important files on your Mac. If you have backed up your Mac with Time Machine before deleting the Safari history, you can use the Time Machine backups to retrieve the deleted Safari browsing data. Here's what to do:

  1. Open Finder and select Go > Go to Folder
  2. Enter ~/Library/Safari and click the Go button. 
  3. Scroll down until you find the History.db database file and select it. 
  4. Click on the Time Machine from the menu bar, and select Enter Time Machine. 
  5. According to the date, find your wanted version of the History.db file that contains your deleted Safari browsing history. 
  6. Click the Restore button to get the selected History.db file back. 
    restore Safari history.db file with TimeMachine


Once the Time Machine restoring process is done, you will get back all your browser data. The next time you open Safari, you will see the browsing history.

However, if you haven't created a Time Machine backup beforehand, this approach to recover the deleted Safari history on Mac might prove to be useless. Then try the last resort - using iCloud to retrieve the Safari history.

Method 3: Recover MacBook deleted Safari history with iCloud

If you're using iCloud to synchronize your Safari history across your Mac and iPhone. Then you may have another option to restore the Safari browsing data from your iPhone to your Mac.

Here are the steps to recover the Safari history by using iCloud Sync:

  1. Launch the iPhone Settings menu on your iPhone. 
  2. Tap on your name to open Apple Profile. 
  3. Select on iCloud and scroll to the Safari app. 
  4. Enable the toggle button for Safari iCloud data sync. 
  5. Select the Keep on My iPhone option. 
  6. Tap on the Merge command. 
    merge Safari history with iCloud


Now all your Safari history present on the iPhone will be overwritten on the iCloud, replacing the one from Mac. Open the Safari browser on Mac, the merged Safari history will be synchronized automatically.

Hope one of the methods mentioned above is helpful to recover the deleted Safari history. If you're not so lucky to have a TimeMachine backup or iCloud Sync beforehand, then using a Mac data software to retrieve the Safari deleted history is your best choice.