Guide

The bookmarks.html file format

Every browser exports bookmarks into the same file, using a format defined by Netscape in 1994 and never meaningfully changed since. Here is what is actually inside it.

A bookmarks.html file is a plain HTML document in the Netscape Bookmark File Format. Folders are <H3> headings, bookmarks are ordinary links, nesting is expressed with nested <DL> lists, and dates ride along in an ADD_DATE attribute. It is text, it is readable, and every browser both writes and reads it.

Format name
Netscape Bookmark File Format
Usual filename
bookmarks.html, favorites.html, or Safari Bookmarks.html
Media type
text/html — it really is HTML, just unusual HTML
Written by
Chrome, Firefox, Safari, Edge, Brave, Opera, Vivaldi and most bookmark managers
Read by
All of the above, plus every tool on this site
Character encoding
UTF-8, declared in a <META> tag at the top

What the file looks like

Here is a complete, valid export containing one folder, one nested subfolder and three bookmarks:

<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
    <DT><A HREF="https://example.com/" ADD_DATE="1698000000">A top-level bookmark</A>
    <DT><H3 ADD_DATE="1698000001">Recipes</H3>
    <DL><p>
        <DT><A HREF="https://example.com/soup" ADD_DATE="1698000002">Soup</A>
        <DT><H3>Desserts</H3>
        <DL><p>
            <DT><A HREF="https://example.org/cake">Cake</A>
        </DL><p>
    </DL><p>
</DL><p>

Why is the HTML broken?

Because it was written for a 1994 parser and changing it now would break every importer. The <DT> elements are never closed, and each <DL> is followed by a stray <p> that opens a paragraph nobody ever closes.

None of that is a mistake to fix. HTML permits omitting the closing tag for <DT>, so a browser's parser recovers the intended nesting on its own: a folder's <DL> ends up inside the <DT> that carries its <H3>. Every importer in existence has been written against these exact quirks, so they have effectively become the specification.

The practical consequence: don't run an export through an HTML tidier or formatter before importing it. You will produce cleaner markup that some importers then read incorrectly.

The attributes, one by one

HREF
The bookmarked URL. The only genuinely required attribute.
ADD_DATE
When the bookmark was created, as a Unix timestamp in seconds. Browsers preserve it across imports, which is why an export often contains dates far older than the computer you made it on.
LAST_MODIFIED
Applied to folders rather than bookmarks. Widely written, rarely read.
ICON
The site's favicon, embedded inline as a base64 data: URI. This is why a 400 KB export can balloon to 4 MB. Most importers ignore it and refetch icons themselves.
ICON_URI
A URL for the favicon instead of the image data. Cheaper, less common.
PERSONAL_TOOLBAR_FOLDER
Marks the one folder that becomes the bookmarks bar on import. Set on an <H3>, not a link.
TAGS
A comma-separated list, written by Firefox. Other browsers discard it silently.
SHORTCUTURL
Firefox keyword shortcuts. Also dropped by everyone else.

What survives an import, and what doesn't

URLs, titles, folder structure and creation dates survive everywhere. Tags, keywords, descriptions and reading lists usually don't.

The format is a lowest common denominator, and that is exactly why it works. When you move between browsers through bookmarks.html, expect to keep:

  • every URL and its title
  • the complete folder tree, at any depth
  • ADD_DATE, so your history of saving stays intact
  • which folder is the bookmarks bar, usually

And expect to lose Firefox tags and keyword shortcuts, per-bookmark descriptions, Safari's Reading List, and anything a browser stores outside its bookmark tree. If those matter, keep a copy of the browser's own native file as well — the paths are in the per-browser guides.

How is this different from Chrome's Bookmarks file?

Chrome's profile file is JSON and is not portable; bookmarks.html is an export format and is.

Inside a Chrome, Edge or Brave profile there is a file named Bookmarks with no extension. It is JSON, it holds the live bookmark tree, and it stores dates as microseconds since 1601 rather than seconds since 1970. It is the working file, not an interchange file — nothing outside Chromium reads it.

Firefox is different again: places.sqlite is a database holding bookmarks and history together, and its automatic backups are LZ4-compressed JSON. Safari uses a binary property list. Three browsers, three private formats, one shared export format between them.

Our viewer, duplicate finder and converter read both the Netscape format and Chrome's JSON, so you can drop in whichever file you have.

Reading one yourself

Opening an export directly in a browser gives you a flat wall of links with the folders discarded — the browser renders the file instead of interpreting it. To actually read the structure, use the bookmarks file viewer, which rebuilds the tree and adds search. To get the data somewhere useful, the converter turns it into CSV, Markdown, JSON or OPML.

Common questions

Can I edit bookmarks.html by hand?
Yes. It is plain text, and a careful find-and-replace across a few thousand URLs is often faster than any interface. Keep the structure intact — matching <DL> depth is what defines your folders — and always work on a copy.
Why is my export so much larger than my bookmarks?
Embedded favicons. Each ICON attribute carries a base64-encoded image, so a few thousand bookmarks can produce a file tens of megabytes long. Importers refetch icons anyway, so the size is harmless.
Does the order of bookmarks in the file matter?
Yes. The file order is the display order — there is no sort attribute. Rewriting the file in a different order changes how the bookmarks appear after import.
Is bookmarks.html a safe long-term backup?
It is the best one available. It is plain text, self-describing, readable in any text editor, and importable by every browser. A copy made today will still open in thirty years, which is not true of any browser's internal database.
Can two exports be combined into one file?
Yes, and it is worth doing properly rather than concatenating them — duplicate folders and duplicate bookmarks both need collapsing. The merge tool does it in your browser.

Next: where your browser keeps its bookmarks file · how to back it up · moving between browsers