Flatten nested bookmark folders
Load a bookmarks HTML export, choose how many folder levels to keep, and download a clean file. Every bookmark is kept. Runs in your browser; nothing is uploaded.
Choose a file (or try the sample) to see the result here.
Before
After
What this flattener does
Bookmark folders grow downwards. A “Work” folder gets a “Clients” folder, each client gets a year, each year gets “Archive”, and five years later the article you want sits six clicks deep. This tool rewrites a bookmark export so the folder tree stops at the depth you choose, without deleting a single bookmark. You get a standard bookmarks HTML file back, ready to import into any browser or bookmark manager.
The before-and-after outline shows exactly which folders change. Bookmarks keep their order, titles, addresses, saved dates, icons and tags; only the folders below your limit are rewritten.
How to flatten your bookmark folders
- Export your bookmarks as an HTML file from your browser’s bookmark manager. The menu paths for each browser are in our Chrome export and import guideand the browser bookmarks migration guide.
- Choose the file above. It is read in this tab; nothing is uploaded.
- Pick Folder levels to keep. Level 1 is a folder directly in the root (for most Chrome exports that is “Bookmarks bar” itself), level 2 is a folder inside that, and so on.
- Pick what happens to deeper folders: join or merge (explained below).
- Check the outline, then press Download flattened HTML.
- Import the file into a new, empty folder first. Once it looks right, delete the old tree.
Join or merge: the two ways to remove depth
Join folder names
A folder below the limit moves up to the deepest allowed level and takes its whole path as its name. With two levels, Research/Sources/2024/Unpublished becomes a folder calledSources-2024-Unpublished inside Research, next to Sources. Every group you created survives, so you can still tell the 2023 sources from the 2024 ones. The cost is longer names. Change the separator if you prefer / or › .
Merge into the parent
Everything below the limit pours into its ancestor at the deepest allowed level. With two levels, every bookmark under Research/Sources/… ends up directly inSources. You get fewer, larger folders, which is often what you want when the deep folders were one or two links each. Tick Add removed folder names as tags to keep the lost structure as tags: a bookmark from Research/Sources/2024 gets the tag2024, written into the TAGS attribute that Firefox uses in its own bookmark exports.
Zero levels: one flat list
Choose 0 to remove every folder. That suits a tool that only accepts a plain list, or a fresh start where you plan to organise by tags or search. Combine it with the tag option so the old folder names are not lost.
Which depth should you choose?
- Two levels is the sweet spot for most libraries: a handful of areas, each with a few topics. It also matches Marqly, whose boards hold two levels.
- One level fits a short list of projects where each folder is browsed as a whole, such as a bookmarks bar.
- Three levels keeps big archives navigable while removing the long tail of single-link folders.
Remember that a browser export usually wraps everything in “Bookmarks bar”, “Other bookmarks” or “Bookmarks Menu”. Those wrappers count as level 1, so a two-level limit keeps the wrapper plus one level of your own folders. Use the before outline to see where your own folders start.
What changes in the file and what stays
- Kept on every bookmark: title, URL, saved date (
ADD_DATE), icon, existing tags and descriptions. - Kept on every folder that survives: its name and attributes, including the flag that marks the bookmarks bar.
- Changed: folders below your limit are renamed (join) or removed (merge). Folders whose contents all moved out are dropped when “Drop folders that end up empty” is ticked; folders that were already empty stay.
- Normalised: the output uses the layout browsers export, one entry per line, so strict importers read it.
Flattening before a Marqly import
You do not have to flatten anything for Marqly. It imports bookmark HTML files, turns your folders into boards, and handles deeper trees itself by joining the remaining folder names with hyphens, the same convention as the join mode here. Use this tool first when you want a different shape, such as merging deep folders and keeping their names as tags. Import keeps titles, URLs, descriptions, tags and two levels of boards; on the Pro plan, AI tagging and semantic search make the flatter library easier to search than the old tree ever was.
Related tools and guides
- Bookmark file viewer: browse and search any export as a table before you change it.
- Duplicate bookmark finder: remove repeated links after flattening merges folders.
- Bookmark file splitter: split a huge export into one file per folder instead.
- Bookmark file validator: find out why an import fails.
- How to organise bookmarks so the tree stays shallow this time.
Frequently asked questions
What does flattening a bookmarks file do?
It limits how deep your folders go. Every bookmark stays in the file, in its original order, with its title, address, saved date and tags. Only the folders below the level you choose change: they either move up with a joined name (Research-Sources-2024) or disappear, with their bookmarks merged into the folder above.
Which mode should I pick, join or merge?
Join keeps every grouping you made, just at a shallower level, so nothing about your organisation is lost; the folder names get longer. Merge gives you fewer, bigger folders. If you merge, tick Add removed folder names as tags so a bookmark from Research/Sources/2024 still carries Sources and 2024 as tags.
Is my bookmarks file uploaded anywhere?
No. The file is read and rewritten by JavaScript in this browser tab. Nothing is sent to a server, there is no account, and closing the tab discards everything. You can watch the network tab of your browser’s developer tools while you use it: flattening makes no requests.
Do I need to flatten my bookmarks before importing them into Marqly?
No. Marqly imports bookmark HTML files, and its boards hold two levels: deeper folders are joined with hyphens on import automatically (Research/Sources/2024 becomes the board Sources-2024 under Research). Flatten first only if you want a different result, such as merged folders or a one-level layout.
Will the flattened file import into Chrome, Firefox, Safari and Edge?
Yes. The download is a standard Netscape bookmark file with the same layout browsers export: the NETSCAPE DOCTYPE, a UTF-8 charset line, uppercase tags and one entry per line. Import it into a fresh folder first so you can compare it with your current bookmarks before deleting anything.





