批量修改浏览器的书签内容

 

首推这个工具:

Bookmark URL Batch Replacer

https://chromewebstore.google.com/detail/bookmark-url-batch-replac/dfnljilidcnlgaaacemdciplbblpjanl

 

 

There is no built-in "find and replace" or batch-edit tool natively inside Google Chrome's Bookmark Manager. However, depending on your technical preference, you can handle this cleanly using a couple of different approaches.

Method 1: The HTML Export/Import Trick (Highly Recommended)

If you need to change a shared pattern across multiple URLs (e.g., a domain migration like changing http://old-domain.com/ to https://new-domain.com/), exporting them to a text file is the safest and most flexible method.

  1. Export Bookmarks:

    • Open Chrome and press Ctrl + Shift + O (Windows/Linux) or Cmd + Option + B (macOS) to open the Bookmark Manager.

    • Click the three vertical dots icon in the top-right corner (next to the search bar) and select Export bookmarks.

    • Save the .html file somewhere accessible.

  2. Edit the URLs:

    • Open the exported HTML file in any plain-text editor (e.g., VS Code, Notepad++, Sublime Text, or vim).

    • Use the Find and Replace feature (Ctrl + H or Cmd + Option + F).

    • Modify your URLs using standard text matching or Regular Expressions (Regex).

    • Save the file.

  3. Import Back to Chrome:

    • Go back to Chrome's Bookmark Manager.

    • To prevent duplicate clutter, delete the original folders you just modified. (Make sure you have a backup copy of your original HTML export just in case).

    • Click the three vertical dots icon again and select Import bookmarks.

    • Select your modified HTML file. They will appear in an "Imported" folder, which you can drag back to your Bookmark Bar or Main Menu.

Method 2: Parsing the JSON Profile File (For Scripting)

If you prefer automation and want to manipulate the raw data directly using tools like Python, Perl, or sed, Chrome stores bookmarks natively as a standard JSON file on your local machine.

  1. Close Google Chrome completely.

  2. Navigate to the Chrome profile directory on your operating system:

    • Windows: %LOCALAPPDATA%\Google\Chrome\User Data\Default\

    • macOS: ~/Library/Application Support/Google/Chrome/Default/

    • Linux: ~/.config/google-chrome/Default/

  3. Locate the file simply named Bookmarks (it has no file extension).

    • Note: Make a backup copy of this file before modifying it.

  4. Use a script or a text editor to parse the JSON array and modify the "url" fields.

  5. Save the file and relaunch Chrome.

Method 3: Using a Browser Extension

If you prefer a graphical interface directly inside the browser, there are specialized extensions built for this exact purpose:

  • Bookmark URL Batch Replacer: An open-source extension (available on the Chrome Web Store) that handles both explicit string substitution and RegExp matching locally on your machine without uploading data.

Which specific change are you looking to make across your URLs (e.g., swapping a domain, altering a path variable, or fixing protocols)? If you have a specific pattern you need to match, I can help you write a quick regex or script to handle it cleanly.

 

 

posted @ 2026-05-30 10:28  profesor  阅读(53)  评论(0)    收藏  举报