How to restore cleared Safari history on Mac?

How to restore and/or completely delete browsing history in Safari on Mac computers?

Occasionally, users clear their internet browsing histories and later regret it, since the information can be useful. Clearing browsing history on Safari is very simple - in a few clicks, all recently-visited URL addresses are removed. If, however, you (or someone else) clear the browsing history as a matter of routine, or without thinking, important addresses may be lost and you might want to revert the action.

Additionally, you might need to check the last browsing activities on your Mac computer (or another user's Mac), but find that the history was deleted. This may appear the be an irrecoverable situation, however, the Safari browsing history is not deleted permanently when clicking 'Clear History' within the application. Although, you might have cleared the browsing history within Safari and are unable to find it under 'History', the records remain within the Mac storage. Knowing the location of Safari's history file is useful not only to restore the lost URL addresses, but also if you wish to completely hide or remove your browsing details. The easiest way to restore deleted browsing data is to use Time Machine's backup. In this article, we cover the methods to restore cleared internet browsing history.


Table of Contents:

Recover cleared Safari browsing history on Mac

The easiest way to recover your deleted browsing history is to use a Time Machine backup. To follow this method, you must have previously created a backup. Start by closing the Safari browser (if running). Connect the Time Machine backup drive on which you have stored the most recent backup file for your Mac. Then launch the Finder application from Dock and click on the Go option in the menu bar at top of the screen. Choose the Go To Folder function. When a new window pops-up requesting that you enter the path, type following and click Go:

  • ~/Library/Safari/


Under the Safari folder, locate the file called 'History.db' and select it. Then click on the Time Machine icon in the menu bar at top of the screen beside the Wi-Fi icon. Select the Enter Time Machine option from the expanded menu.


A new window with Time Machine backup will open. Browse through the available backup files and look for History.db under the Safari folder. Select it and click the Restore button at the bottom of the window.


Time Machine will automatically restore the required file. When the process is finished, the Safari browsing history is restored. Launch Safari again. You can now expand the history items that were saved to the backup file. If you wish to check all items in the history, click on History in the menu bar at the top of the screen and select the Show all History option. Alternatively, use the keyboard shortcut of Command and Y to access all history. The list with all saved URLs will appear. To make navigation easier, you might consider using the search field at the top right corner of the Safari window.

Note that History.db is essentially a database file that can be reviewed with any SQL editor. You can also freely navigate the data by entering SQL queries. This method relates to Mac computers. You can restore browsing history on iOS devices with a similar method, however, rather than a Safari file, you must restore the whole device. You can restore the iOS device via an iTunes or iCloud backup.

Video Showing how to restore deleted Safari browsing history on Mac

[Back to Top]

About the author:

Tomas Meskauskas

I am passionate about computer security and technology. I have an experience of 10 years working in various companies related to computer technical issue solving and Internet security. I have been working as an editor for since 2010. Follow me on Twitter to stay informed about the latest tech news or online security threats. Contact Tomas Meskauskas.

Our guides are free. However, if you want to support us you can send us a donation.