Backing up your Firefox history protects your browsing data from accidental loss when switching devices, reinstalling the browser, or troubleshooting issues. This guide shows you how to export your history to an HTML file or copy the underlying database, and how to restore it later. You’ll need access to your Firefox profile folder and, for the HTML method, a working Firefox installation.
What You’ll Need
- A computer with Firefox installed (for the HTML export method).
- File Explorer (Windows) or Finder (Mac) to locate your profile folder.
- Optional: A USB drive or cloud storage to store the backup file.
Step-by-Step
Method 1: Export History as HTML (Recommended for portability)
- Open Firefox on your computer.
- Click the library icon (books) in the toolbar, or press Ctrl+Shift+H (Windows/Linux) or Cmd+Shift+H (Mac) to open the Library window.
- In the Library window, click Import and Backup in the toolbar.
- Select Export History to HTML… from the dropdown menu.
- Choose a location to save the file (e.g., Desktop or Documents), give it a name like
firefox-history-backup.html, and click Save. - Your entire browsing history is now saved as an HTML file that can be opened in any browser or imported back into Firefox later.
Method 2: Copy the Places Database (Full Backup)
- Close Firefox completely (all windows, including background processes).
- Open your Firefox profile folder:
- Windows: Press Win+R, type
%APPDATA%\Mozilla\Firefox\Profiles\, and press Enter. - Mac: Open Finder, press Cmd+Shift+G, type
~/Library/Application Support/Firefox/Profiles/, and press Go. - Linux: Navigate to
~/.mozilla/firefox/in your file manager.
- Windows: Press Win+R, type
- You’ll see one or more folders ending in
.defaultor.default-release. Open the one that matches your main profile (usually the one with the most recent modification date). - Locate the file named
places.sqlite. This file contains your entire browsing history, bookmarks, and visit metadata. - Copy
places.sqliteto a safe location (external drive, cloud folder). For extra safety, also copy theplaces.sqlite-walandplaces.sqlite-shmfiles if they exist. - To restore, close Firefox, replace the
places.sqlitein the profile folder with your backup, and restart Firefox.
Method 3: Sync with a Firefox Account (Automatic)
- Click the menu button (three horizontal lines) in the top-right corner.
- Select Sign in to Sync (or Sync and save data).
- Follow the prompts to create or sign in to a Firefox Account.
- In the sync settings, ensure History is checked (it’s usually enabled by default).
- Your history is now continuously backed up to Mozilla’s servers and can be restored on any device by signing in.
Common Mistakes
- Not closing Firefox before copying the database. If Firefox is running,
places.sqlitemay be locked or corrupted when copied. Always close Firefox completely first. - Copying the wrong profile folder. If you have multiple profiles, you might back up an old or unused one. Check the profile’s modification date or look for the one with your recent bookmarks.
- Overwriting the wrong file during restore. When restoring, make sure you replace the
places.sqlitein the correct profile, not the default one. - Assuming the HTML export includes passwords or open tabs. The HTML export only contains history and bookmarks, not cookies, passwords, or session data.
Tips
- Schedule regular backups: set a reminder to export your history to HTML monthly if you rely on it for work or research.
- Combine methods: use Sync for automatic cloud backup and occasionally export to HTML for a local, portable copy.
- Compress the
places.sqlitebackup into a ZIP file to save space and keep related files together. - If you’re migrating to a new computer, use the HTML export to import history into Firefox on the new machine, or simply copy the entire profile folder for a full transfer.
Troubleshooting
- Export to HTML fails or produces an empty file: Try restarting Firefox in Safe Mode (help menu → Restart with Add-ons Disabled) and export again. If that works, a corrupt extension is the cause.
- Copied
places.sqlitedoesn’t show history after restore: Firefox may have created a newplaces.sqlitesince the backup. Close Firefox, delete the currentplaces.sqlite(and its -wal/-shm files), then paste your backup. Start Firefox and check. - History appears but bookmarks are missing: The HTML export includes bookmarks, but if you used the database method, ensure you restored the entire
places.sqlitefile, not just part of it. - Sync doesn’t show history on another device: Go to Sync settings and click Sync Now. Also verify that the device is signed in with the same account.
- Can’t find the profile folder: In Firefox, type
about:supportin the address bar and press Enter. Look for the Profile Folder row and click Open Folder (Windows) or Show in Finder (Mac).
Frequently Asked Questions
Does the HTML export include passwords?
No. The HTML export only includes history and bookmarks. Passwords are stored separately in logins.json and are not part of the HTML backup.
Can I restore history from the HTML file?
Yes. In the Library window, go to Import and Backup → Import History from HTML… and select the file. It will merge the imported history with your existing history.
Will copying places.sqlite also back up my bookmarks?
Yes, places.sqlite contains both history and bookmarks. That’s why it’s a full backup.
How often should I back up my history?
If history is important to you, a monthly backup is a good rule. If you use Firefox Sync, it’s continuous.
Can I back up history on my phone?
Firefox for Android and iOS don’t allow direct file access to the history database. Use Sync to back up mobile history to your Firefox Account.
Is there a way to export history to CSV or Excel?
Firefox doesn’t have a built-in CSV export for history. You can use the HTML export and then convert it to CSV using a spreadsheet program or a third-party tool.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Payday 2 Crash Issues on PC: A Step-by-Step Guide
- Remove a Remote Access Trojan from Windows PC
- Facebook as AIM Messenger: Step-by-Step Guide
- iPhone 17 SOS Service Issue: How to Fix It
- Google Pixel & Pixel XL: How to Turn Off Snooze
- Install VLC Extensions on Linux