Restore Lost Firefox Bookmarks – Simple Step‑by‑Step Guide
In this article
Yes, you can restore missing Firefox bookmarks by using a backup file or the places.sqlite file from your profile. Firefox keeps automatic backups, and you can also import a previously exported HTML file.
What You'll Need
- Firefox installed on the same computer where the bookmarks were lost
- Access to the Firefox profile folder (usually in %APPDATA%/Mozilla/Firefox/Profiles on Windows, ~/Library/Application Support/Firefox/Profiles on macOS, or ~/.mozilla/firefox on Linux)
- An existing backup – either an automatic JSON backup in the "bookmarkbackups" folder or a manual HTML/JSON export you saved earlier
- A text editor (optional, for inspecting JSON files)
Step‑by‑Step
- Close Firefox. All changes to the bookmarks database are written to the
places.sqlitefile only when the browser is closed. This prevents corruption while you replace files. - Locate your profile folder. Open the Run dialog (Windows + R) and type
%APPDATA%\Mozilla\Firefox\Profiles\. On macOS, open Finder, choose Go > Go to Folder and enter~/Library/Application Support/Firefox/Profiles/. On Linux, navigate to~/.mozilla/firefox/. You will see one or more folders with names likexxxxxxxx.default-release. - Identify the correct profile. If you have only one folder, that is your profile. If there are several, open each
prefs.jsfile and look for the lineuser_pref("browser.startup.homepage", ...)that matches your home page, or simply open Firefox withfirefox -Pto see the profile names. - Backup the current profile. Copy the entire profile folder to a safe location (e.g.,
Desktop/FirefoxProfileBackup). This ensures you can revert if anything goes wrong. - Check the automatic bookmark backups. Inside the profile folder, open the
bookmarkbackupssub‑folder. You will see files named like2024-09-01.jsonlz4. These are compressed JSON backups created by Firefox every 30 minutes and at shutdown. - Choose a recent backup. Select the file with a timestamp just before the bookmarks disappeared. If you are unsure, pick the most recent one.
- To view its contents, rename the file extension from
.jsonlz4to.jsonand open it in a text editor. You should see a JSON structure with "children" arrays representing folders and bookmarks.
- To view its contents, rename the file extension from
- Replace the current bookmarks database. In the profile folder, locate
places.sqlite(the live bookmarks database). Delete or rename it (e.g.,places.sqlite.old). Then copy the chosen backup file into the profile folder and rename it toplaces.sqlite. If the backup is a JSON file, you cannot rename it directly; instead you will import it via Firefox’s Library UI (see step 9). - Start Firefox. Launch the browser. If you replaced
places.sqlitewith a JSON backup, Firefox will create a newplaces.sqlitefrom that JSON automatically. Your missing bookmarks should now appear. - If you used a manual HTML export. Open Firefox, press Ctrl+Shift+O (or click the Library button ► Bookmarks ► Show All). In the Library window, click Import and Backup ► Import Bookmarks from HTML… and select the HTML file you exported earlier. Confirm the import and verify that the bookmarks reappear.
- Verify integrity. Browse a few restored bookmarks to ensure they open correctly. Also, open the Library window again and check that the folder hierarchy matches what you expect.
- Enable automatic backups (if not already). In Firefox, go to Options/Preferences ► Privacy & Security ► scroll to Bookmarks and ensure the box for “Create a backup of my bookmarks every …” is checked. This reduces the chance of future loss.
- Delete the temporary backup files. Once you are satisfied that the bookmarks are restored, you may delete the
places.sqlite.oldfile and any extra JSON files you copied, keeping only the regular automatic backups that Firefox maintains.
Common Mistakes
- Replacing the wrong profile. Users with multiple profiles sometimes replace
places.sqlitein a profile they don’t actually use. Always verify the profile by checking theprofiles.inifile or using the profile manager (firefox -P). - Opening a JSON backup directly. The
.jsonlz4files are compressed; trying to open them in Firefox as an HTML import will fail. They must be either renamed to.jsonfor manual inspection or imported via the Library UI as described. - Skipping the profile backup. Overwriting
places.sqlitewithout a backup can permanently delete data if the chosen backup is corrupted. - Using an outdated backup. Selecting a backup from before the bookmarks were added will not restore the missing items. Check timestamps carefully.
Tips
- Keep a manual export of your bookmarks (File ► Export Bookmarks to HTML) on a USB drive or cloud storage. This gives you a portable, version‑independent copy.
- Use a third‑party tool like places only if you are comfortable with command‑line JSON manipulation; otherwise stick to Firefox’s built‑in import/export.
- If you frequently sync with a Firefox Account, ensure sync is enabled for bookmarks (Settings ► Sync ► Bookmarks). Sync can recover bookmarks lost on a single device.
- When working on a corporate or managed PC, administrative policies might block access to the profile folder. In that case, ask your IT department for temporary access.
Troubleshooting
If the restored bookmarks do not appear, try the following checks in order:
- Restart Firefox. Some changes to
places.sqliteare only read on startup. - Confirm the backup file is not corrupted. Open the JSON file in a text editor; the first line should start with
{"roots":{. If the file is garbled, choose a different backup. - Check for multiple profiles. Open the profile manager (
firefox -P) and make sure you are launching the profile you edited. - Verify file permissions. On Windows, right‑click
places.sqlite→ Properties → Security and ensure your user account has read/write rights. On macOS/Linux, usechmod 600 places.sqliteif necessary. - Disable extensions temporarily. Some bookmark‑managing extensions can overwrite the database on launch. Start Firefox in safe mode (
firefox -safe-mode) and see if the bookmarks appear. - Re‑import using the Library UI. Even after replacing
places.sqlite, you can still import an HTML file as a fallback. - Re‑create a fresh profile. As a last resort, create a new profile, import the backup into that profile, and then copy the
places.sqlitefile back to your original profile after confirming everything works.
Frequently Asked Questions
Can I restore bookmarks if I never exported them?
Yes. Firefox automatically creates JSON backups in the bookmarkbackups folder, and those can be used to reconstruct your bookmarks.
Will restoring a backup delete my current browsing history?
No. The places.sqlite file stores both bookmarks and history, but restoring only affects the bookmark tables. Your history remains intact unless you replace the entire file with a version that predates the history you want.
Is there a way to restore bookmarks from a synced Firefox Account?
If you have sync enabled for bookmarks, signing out and back into the Firefox Account forces a re‑sync, which often pulls back missing items.
What if the automatic JSON backup is corrupted?
Try an older backup file in the same folder, or use a manual HTML export you may have saved elsewhere. If no usable backup exists, you may need to recreate the bookmarks manually.
Can I use the same steps on mobile Firefox?
Mobile Firefox does not expose the profile folder or backup files, so the desktop method does not apply. On mobile, the only option is to sync with a Firefox Account and restore via the cloud.
Will importing an HTML file overwrite existing bookmarks?
No. Firefox adds the imported bookmarks into a folder named “Imported Bookmarks” by default, preserving your current set.