Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to download a copy of all your bookmarks


This is for a Unix shell (because of for, cut, wget, etc) and for Firefox (because FF exports bookmarks as JSON, where each entry has a uri property). YMMV.


  1. Make sure you have wget installed
  2. Install jq
  3. Export all your bookmarks (or a subset) as a JSON file:
    Ctrl+Shift+OImport and BackupBackup…
    (say you save it as /tmp/bookmarks.json)


for i in `cat /tmp/bookmarks.json | jq '[.. | .uri? | select(.) ]' | cut -d '"' -f 2`; do
    wget -r -l 1 $i

This will create directories for each domain, under the current dir.
Pass larger integers to wget param -l if you want to dig deeper into each URL.

Thanks to jq recipes

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