How to Export Chrome Bookmarks as JSON — and Why I Built a One-Click Extension for It

Published: (February 4, 2026 at 02:20 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

What it does

  • No popup, no settings, no account.
  • Works offline.
  • The whole extension is about 5 KB.

Permissions

  • bookmarks — to read your bookmark tree

The code

chrome.action.onClicked.addListener(exportBookmarks);

async function exportBookmarks() {
  const bookmarks = await chrome.bookmarks.getTree();
  const blob = new Blob([JSON.stringify(bookmarks, null, 2)], { type: 'application/json' });
  const url = URL.createObjectURL(blob);

  chrome.downloads.download({
    url,
    filename: 'bookmarks.json',
    saveAs: true
  });
}

The extension uses Manifest V3, the chrome.bookmarks API to retrieve the tree, and chrome.downloads to save the file.

When it’s useful

  • Backing up bookmarks in a readable format.
  • Version‑controlling your bookmark collection.
  • Feeding bookmarks into scripts or other tools that consume JSON.

Try it

  • Chrome Web Store – (link to the extension)
  • GitHub – (link to the source code)
Back to Blog

Related posts

Read more »

Currying in JavaScript

When I first learned JavaScript, concepts like currying felt confusing and unnecessary—until I actually started using it. What is Currying? Currying is a functi...

Battle-Testing Lynx at Allegro

Article URL: https://blog.allegro.tech/2026/02/battle-testing-lynx-js-at-allegro.html Comments URL: https://news.ycombinator.com/item?id=46897810 Points: 11 Com...