Last active
October 16, 2025 10:27
-
-
Save lindeskar/347fd5da63b91a109d382500adc70960 to your computer and use it in GitHub Desktop.
macOS 10.13 Safari browser history with timestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sqlite3 $HOME/Library/Safari/History.db "select datetime(visit_time + 978307200, 'unixepoch', 'localtime') as date, title from history_visits order by visit_time asc" |
Hi @ @lindeskar,
Sorry for the stupid question, where do I run your code to see the time stamp for the safari browser?
Thanks in advance!
Yeah. Works. Thanks a lot :D
Works well but doesn't show url unfortunately. Url is in another table I think
Might be useful for someone: you can view the history visually in a GUI like https://sqlitebrowser.org/dl/
It's the same file in the command line: /Users/your_user_name/Library/Safari/History.db
Hope this helps someone.
thanks microsoft copilot for writing a script that takes account for profiles (they have separate history): https://gist.github.com/mailinglists35/3957a8096a3fe03daced8df3d06355f1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, this is great! :D
I really missed the timestamps from Chrome (but Chrome was a CPU/Memory hog, so I had to switch to Safari). And it was difficult finding any clean way to get the history in Safari (for my timesheet), but this did the trick!