Is there a way to determine the number of bookmarks and bookmark folders you have?

I’m planning to use a Chrome extension to clean up my Brave bookmarks.

I would like to be able to find out how many bookmarks I have before the clean-up so that I can compare it to the number I have after the clean-up.

I can see the bookmarks’ ‘memory usage’ but haven’t found a way to view any additional information about them.

Is there a way I can find out the number of bookmarks and bookmark folders I currently have?

Thanks.

Mac OS 10.15.7 (Catalina)
Brave Beta Version 1.66.90 Chromium: 124.0.6367.82 (Official Build) beta (x86_64)

@Saoiray Can you check on whether this is possible (i.e., " Is there a way I can find out the number of bookmarks and bookmark folders I currently have?"). Thanks.

(Also, ‘direct messages’ are no more, correct?)

If you are using Brave Sync, you can see the total number of bookmarks on you brave://sync-internals page.

Outside of that, you’ll likely need an extension to do this work for you.

@mattches Does one have to complete the entire Sync setup to see that information, including identifying/linking a ‘second device’?

It also appears that the ‘internals’ page only displays the number of ‘bookmarks’, not ‘bookmark folders’.

I don’t have any sense of how many bookmarks I have, and think that information (same for bookmark folders) should be available to users.

I’ll recommend adding it in the Feature Request forum.

Thanks for your reply.

It’s a good idea to export your bookmarks before doing a cleanup, and from that export you can count the folders and bookmarks. Open the backup in a text editor which shows counts of text you search for. For folders, search for “/H3>,” for bookmarks search for “HREF=”.

Alternatively, since you have an extension which manages bookmarks you can use that to access the Bookmarks API in the Console, and that can give you the data you want.

  • Open the Extensions page brave://extensions/
  • Turn Developer Mode on by switching the button in the top right
  • Find your Bookmark extension
  • If it shows “Inspect views”, click the link to open the Console
  • If it does not, open the Console by right-clicking the toolbar icon and selecting “Inspect Pop-up”

Paste the code below into the Console. You might be shown a warning about the dangers of running code in the Console. Always heed that, and check the code.

const allBookmarks = await chrome.bookmarks.search({});
console.log("Folders:", allBookmarks.filter(b => !b.url).length);
console.log("Bookmarks:", allBookmarks.filter(b => b.url).length);

I get slightly different results from each method:
The Sync Internals page says I have 1489 bookmarks
The export says I have 927 bookmarks in 567 folders (1494 in total)
The API says I have 920 bookmarks in 566 folders (1486 in total)

These overly technical responses completely miss the point. There should be an easy, user friendly way for us to see just how many bookmarks we have either in Settings or better yet when we visit Bookmark Manager. You have X Folders & Y links. Simple. Ain’t nobody got time for exporting, running diagnostics, digging through system info, etc. Just give me the executive summary.

Hey thanks, @Mythical5th!
But wow, all those steps just to see:
– no. of bookmarks, and
– no. of bookmark folders.

Thanks, I agree 100%.