Chrome stores history as an SQLITE3 database.
First, find it.
Close Chrome.
Open up the terminal, and navigate to the directory that contains the History file.
1 | cd ~ /Library/Application \ Support /Google/Chrome/Default/ |
Open the database with SQLITE3:
1 | sqlite3 History |
Enable Sqlite3 output mode as CSV by typing into sqlite shell:
1 2 3 | sqlite> .headers on sqlite> .mode csv sqlite> . output my-chrome- output .csv |
Now, execute the SQL statement (copy and paste). Note that by default, the time stamp is not “human readable” so we’ll insert some logic to convert times into our local time zone / months, years, and that good stuff.
1 2 3 4 | SELECT datetime(last_visit_time/1000000-11644473600, 'unixepoch' , 'localtime' ), url FROM urls ORDER BY last_visit_time DESC |
Report this ad
Done! Check your directory for my-chrome-output.csv.
Why this isn’t documented anywhere except in small pieces? Don’t know.
I just made a chrome extension that lets you export your entire Chrome history as a csv Excel-readable spreadsheet and json: https://chrome.google.com/webstore/detail/hcohnnbbiggngobheobhdipbgmcbelhh/publish-accepted
This is awesome except for the LastTimeVisited.
For Aug 24, 2014 @ 12:20:xx it lists a value of 1408900847799.88 how do I get this date time format from what ever it’s stored as to a date/time format that I can understand.
Very nice. I needed this earlier… !
Your extension only works for the 90 day window, not for archived history (beyond 90 days)
http://superuser.com/a/694283/413997
Thank you, the SQL statement was very helpful.
Thanks! Note: I found the database on Linux Cinnamon Mint 18 here: ~/.config/google-chrome/Default/History
You are missing a semi colon at the end of your Query
I am on MAC and getting “database is locked” error.
Quit your browser and try again.