Skip to content

Instantly share code, notes, and snippets.

@TravelingTechGuy
Created May 9, 2016 14:10
Show Gist options
  • Select an option

  • Save TravelingTechGuy/7ac464f6cccde912a6ec7a1e2f8aa96a to your computer and use it in GitHub Desktop.

Select an option

Save TravelingTechGuy/7ac464f6cccde912a6ec7a1e2f8aa96a to your computer and use it in GitHub Desktop.
Get your Chrome history as a CSV file
#!/bin/bash
# Locate the history file in your profile, and copy it to the same folder as this script.
# On Mac: ~/Library/Application\ Support/Google/Chrome/Default/History
# On Windows: C:\Users\YOUR USER NAME\AppData\Local\Google\Chrome\User Data\Default\History
sqlite3 History <<!
.headers on
.mode csv
.output out.csv
select datetime(last_visit_time/1000000-11644473600,'unixepoch') as 'date',url from urls order by last_visit_time desc;
!
@jelabarre59

Copy link
Copy Markdown

Everybody says to run "sqlite" or "sqlite3", but I don't think it's installed by default as part of GChrome. I did find it in the Gimp and Inkscape directories, will have to see if those work here.

@kostask

kostask commented Sep 10, 2019

Copy link
Copy Markdown

Great! Still works in 2019 ;-) (On MacOS 10.14.6 - Google Chrome Version 76.0.3809.132)

@phanirithvij

Copy link
Copy Markdown

If anyone is using Brave browser on windows %LocalAppData%\BraveSoftware\Brave-Browser\User Data\Default is the path.

@WWWaheb

WWWaheb commented Feb 11, 2022

Copy link
Copy Markdown

Still works in 2022!

@FrancescoRosi

Copy link
Copy Markdown

Still works in 2023, even on Brave!

@janez33

janez33 commented May 25, 2025

Copy link
Copy Markdown

Still works in 2025 (for Chrome history from 2016)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment