[
    {
        "role": "user",
        "content": "how%20and%20where%20does%20firefox%20store%20bookmarks%3F"
    },
    {
        "role": "assistant",
        "content": "Here\u2019s how and where Firefox stores bookmarks, including the files involved, formats, and how to access or restore them:\n\n---\n\n## \ud83e\uddf0 Primary Storage: `places.sqlite`\n\n- Firefox stores the current set of your bookmarks *and* your browsing history (and downloaded files list) in a single SQLite database file named **places.sqlite**, located in your Firefox profile folder. ([support.mozilla.org](https://support.mozilla.org/mk/questions/871164?utm_source=openai))  \n- Within `places.sqlite`, bookmarks are stored in the table called `moz_bookmarks`. Folders and hierarchy are represented via parent-child relationships (each bookmark/folder record has a \u201cparent ID\u201d linking to its folder) ([stackoverflow.com](https://stackoverflow.com/questions/464516/firefox-bookmarks-sqlite-structure?utm_source=openai))  \n- Favicons (site icons) are stored in a separate SQLite file `favicons.sqlite`, though these are closely linked (sometimes attached) to the main places database. ([searchfox.org](https://searchfox.org/firefox-main/source/browser/components/places/docs/architecture-overview.rst?utm_source=openai))  \n\n---\n\n## \ud83d\udd01 Backups: `bookmarkbackups` folder and `.jsonlz4` files\n\nFirefox automatically saves daily backups of your bookmarks in your profile\u2019s `bookmarkbackups` folder. These backups use a compressed JSON format: `bookmarks-YYYY-MM-DD.jsonlz4`. ([connect.mozilla.org](https://connect.mozilla.org/t5/discussions/exporting-bookmarks-structure-as-well-as-content/m-p/29756?utm_source=openai))\n\nThese backups allow you to restore bookmarks if something happens to your main `places.sqlite` file, or if you accidentally lose bookmarks. ([microcenter.com](https://www.microcenter.com/tech_center/article/4517/how-to-restore-firefox-bookmarks-from-a-backup?utm_source=openai))\n\n---\n\n## \ud83d\udcc2 Finding the Profile Folder\n\nThe exact location depends on your operating system:\n\n| OS        | Default Profile Path                                                                 |\n|------------|---------------------------------------------------------------------------------------|\n| Windows    | `%APPDATA%\\Mozilla\\Firefox\\Profiles\\` \u2014 inside there are one or more folders with names like `xxxxxxxx.default-release` ([reddit.com](https://www.reddit.com/r/firefox/comments/19avqgi?utm_source=openai)) |\n| macOS      | `~/Library/Application Support/Firefox/Profiles/` |\n| Linux      | `~/.mozilla/firefox/` followed by the profile folder |\n\nTo reach it quickly:\n1. Open Firefox and type `about:support` in the address bar.\n2. Look for the **\u201cProfile Folder\u201d** line.\n3. Click \u201cOpen Folder\u201d (or \u201cShow in Finder\u201d / \u201cOpen Directory\u201d) to navigate there directly. ([tinygrab.com](https://tinygrab.com/how-to-restore-favorites-in-firefox/?utm_source=openai))  \n\n---\n\n## \ud83d\udee0\ufe0f How to Restore Bookmarks from Backup\n\nIf your bookmarks get lost or corrupted:\n\n1. Close Firefox completely.\n2. Go to the profile folder \u2192 `bookmarkbackups` sub-folder.\n3. Copy the most recent `bookmarks-YYYY-MM-DD.jsonlz4` file.\n4. In Firefox, go to the Bookmarks Library (`Ctrl+Shift+O` or via menu: *Bookmarks \u2192 Manage Bookmarks*) \u2192 **Import & Backup \u2192 Restore** \u2192 *Choose File...* and select that backup. ([support.mozilla.org](https://support.mozilla.org/bm/questions/1138179?utm_source=openai))  \n\nIf `places.sqlite` is corrupt, replacing it with a clean copy or restoring from a full profile backup may be needed.\n\n---\n\n## \ud83d\udd0d Technical & Forensic Details\n\n- You *can* open `places.sqlite` with any SQLite viewer to see the `moz_bookmarks` table; it's not encrypted. Be careful: Firefox needs control of that file while it's running. Tampering with it while Firefox is open can lead to corruption. ([reddit.com](https://www.reddit.com/r/firefox/comments/l0uaiw?utm_source=openai))  \n- The `places.sqlite` file also contains history entries and other metadata (visit counts, frecency = a relevance metric for the address bar suggestions), which are stored in related tables like `moz_places`, `moz_historyvisits`, etc. ([renenyffenegger.ch](https://renenyffenegger.ch/notes/development/web/browser/Firefox/profile-folder/places_sqlite/index?utm_source=openai))  \n\n---\n\nIf you tell me what OS you're using (Windows, macOS, Linux) I can walk you through exactly where to find your bookmarks on *your* system."
    }
]