How to Export Your Chrome Browsing History to a CSV File Using SQLite

Google Chrome tracks every website you visit, storing this data in your local browsing history. While Chrome allows you to view this history through its standard settings menu (by pressing Ctrl+H), it does not provide a native “Export to CSV” button for your browsing logs. This can be frustrating if you need to analyze your web activity in Microsoft Excel, audit employee computer usage, or back up your data before migrating to a new system.

Fortunately, Chrome stores all your browsing history in a standard SQLite database file on your hard drive. By accessing this file directly, you can easily extract and export your entire history into a clean, organized CSV file.

Step 1: Locate the Chrome History Database

Before you begin, you must completely close Google Chrome. The database is locked while the browser is running, and you cannot extract data from a locked file.

Once Chrome is closed, you need to navigate to the hidden directory where the database file is stored.

  1. Press the Windows Key + R on your keyboard to open the Run dialog box.
  2. Type the following path exactly and press Enter: %LocalAppData%\Google\Chrome\User Data\Default
  3. In the folder that opens, scroll down and look for a file simply named History. (It will not have a file extension, but its Type will likely be listed as “File”).

This single file contains your entire browsing history database.

Step 2: Download an SQLite Viewer

Because the History file is an SQLite database, you cannot open it with a normal text editor. You need a free database viewer.

  1. Download and install DB Browser for SQLite (a free, open-source tool) from sqlitebrowser.org.
  2. Open DB Browser for SQLite.
  3. Click Open Database at the top of the window.
  4. Navigate to the folder from Step 1 (%LocalAppData%\Google\Chrome\User Data\Default) and select the History file. Note: You may need to change the file type filter in the open dialog from “SQLite database files” to “All files (*)” to see it.

Step 3: Query and Export the Data to CSV

Once the database is open, you will see a complex structure of tables. The actual URLs and visit times are stored across two linked tables: urls and visits.

  1. Click on the Execute SQL tab in DB Browser.
  2. Paste the following SQL query into the text box. This query joins the tables and converts Chrome’s specific WebKit timestamp into a readable date format:
SELECT 
    datetime(visits.visit_time/1000000-11644473600, 'unixepoch', 'localtime') AS Visit_Time,
    urls.title AS Page_Title,
    urls.url AS URL
FROM visits 
JOIN urls ON visits.url = urls.id
ORDER BY visits.visit_time DESC;
  1. Click the Play button (Execute) above the text box. A neatly organized list of your entire browsing history will appear in the bottom pane.
  2. To save this data, click the Save icon above the results pane (it looks like a floppy disk) or click File > Export > Table(s) as CSV file…
  3. Choose where you want to save the file, name it chrome_history.csv, and click Save.

You can now open this CSV file in Excel, Google Sheets, or any other spreadsheet application for easy viewing and sorting.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.