User Agents

Firefox Profile Backup: How to Save and Restore

To back up a Mozilla Firefox profile, you need to copy the profile folder that contains your bookmarks, passwords, history, extensions, and settings. The exact location depends on your operating system, but you can find it by typing about:support in the address bar and clicking the “Open Profile Folder” button. Once you locate the folder, close Firefox completely and copy the entire folder to a safe location, such as an external drive or cloud storage. This preserves your data and lets you restore it later by copying the folder back into the same directory.

What a Firefox Profile Contains

A Firefox profile is more than just bookmarks. It is a directory that stores nearly everything that makes your browser feel like yours. Key files and subfolders include:

  • places.sqlite – bookmarks, history, and annotations
  • logins.json and key4.db – saved passwords (encrypted)
  • prefs.js – user preferences and settings
  • extensions folder – installed add-ons
  • cookies.sqlite – cookies and site data
  • cert9.db – security certificates
  • sessionstore.jsonlz4 – open tabs and windows (when Firefox is closed)
  • formhistory.sqlite – saved form data

Because the profile folder holds sensitive data like passwords and cookies, treat backups as confidential. The passwords are encrypted, but if you also copy the key files, they can be decrypted on another machine with the same master password (if set).

How to Locate Your Firefox Profile Folder

Firefox does not store profiles in a single fixed path across all systems. The easiest way to find the active profile is:

  1. Open Firefox and type about:support in the address bar.
  2. Look for the “Profile Folder” row in the “Application Basics” section.
  3. Click the “Open Folder” button (Windows) or “Show in Finder” (macOS). On Linux, the button may say “Open Directory.”

Alternatively, you can use the Profile Manager by launching Firefox with the -P flag, but the about:support method is simpler for most users. The default profile folder names are random strings like xxxxxxxx.default-release.

Typical locations:

  • Windows: %APPDATA%\Mozilla\Firefox\Profiles\
  • macOS: ~/Library/Application Support/Firefox/Profiles/
  • Linux: ~/.mozilla/firefox/

Note that on Windows, the %APPDATA% folder is hidden by default; you can paste the path into the File Explorer address bar to access it.

Step-by-Step: Backing Up Your Profile

Follow these steps to create a reliable backup:

  1. Close Firefox completely. If Firefox is running, files like places.sqlite may be locked or in an inconsistent state. Ensure no Firefox processes remain in the task manager (Windows) or Activity Monitor (macOS).
  2. Locate the profile folder using the method above.
  3. Copy the entire profile folder to a destination outside the Firefox directory—for example, an external hard drive, a USB stick, or a cloud sync folder like Dropbox or OneDrive. Do not move it; copy it.
  4. Optionally, compress the folder into a ZIP archive to save space and keep files together. Right-click the folder and choose “Send to > Compressed (zipped) folder” on Windows, or “Compress” on macOS.
  5. Label the backup with the date and Firefox version for future reference.

If you use multiple profiles, repeat the process for each one. You can see all profiles by visiting about:profiles in Firefox.

Restoring a Backup

To restore, close Firefox, then copy the backed-up profile folder back into the Firefox Profiles directory. If you are replacing an existing profile, rename the old folder first as a precaution. Then launch Firefox with the Profile Manager (firefox -P or firefox.exe -P) and select the restored profile. Alternatively, you can use the about:profiles page to create a new profile and point it to the restored folder, but direct copying is usually simpler.

Be aware that if the backup was made on a different operating system or Firefox version, some settings or extensions may not carry over perfectly. In most cases, bookmarks, history, and passwords will transfer without issue.

Using Firefox Sync as a Complement

Firefox Sync is not a full backup solution—it synchronizes bookmarks, history, passwords, open tabs, and add-ons across devices, but it does not back up all preferences, certificates, or local data. However, using Sync alongside manual backups provides an extra layer of protection. If your computer fails, Sync can restore much of your data to a new installation, but you will still need a manual backup for complete settings and extensions.

To set up Sync, go to about:preferences and sign in with a Mozilla account. Sync runs automatically in the background. Remember that Sync is tied to your account; if you forget your password, you may lose access to synced data unless you have a recovery key.

Common Problems and Solutions

Backing up a profile is usually straightforward, but you may encounter issues:

  • File in use errors: Firefox must be fully closed. Check for background processes like firefox.exe in Task Manager and end them.
  • Large profile size: Profiles can grow to several gigabytes due to cache and stored data. You can exclude the cache2 folder from backups to save space, as it is regenerated automatically.
  • Corrupted profile after restore: If Firefox fails to start, try creating a new profile and copying only essential files (like places.sqlite and logins.json) into it.
  • Missing passwords: If passwords do not appear after restore, ensure you copied logins.json and key4.db. If you used a master password, you will be prompted for it.

Always test your backup by restoring it to a spare profile or another computer before relying on it.

Frequently Asked Questions

Can I back up Firefox bookmarks separately?

Yes. Firefox can export bookmarks to an HTML file via the Library (Ctrl+Shift+O or Cmd+Shift+O), then “Import and Backup” > “Export Bookmarks to HTML.” This is useful for sharing or quick backups, but it does not include passwords, extensions, or settings.

Does copying the profile folder back up my saved passwords?

Yes, the files logins.json and key4.db contain your saved logins. They are encrypted, but if you have set a master password, it will be required to decrypt them on restore.

How often should I back up my Firefox profile?

There is no fixed rule. Back up after significant changes—such as adding many bookmarks, installing extensions, or changing settings—and before major Firefox updates or system migrations. A monthly routine is reasonable for most users.

Can I use a backup on a different computer?

Yes, you can copy the profile folder to another computer with Firefox installed. However, paths and some settings may differ, and extensions might need to be reinstalled if they are platform-specific. Use the Profile Manager to load the copied profile.

What happens if I delete my Firefox profile?

Deleting the profile folder removes all bookmarks, history, passwords, and settings associated with that profile. Firefox will create a new, empty profile on next launch. Always back up before deleting.

Is Firefox Sync a substitute for a profile backup?

No. Sync covers bookmarks, history, passwords, tabs, and add-ons, but not all preferences, certificates, or local storage. A manual profile backup is the only way to capture everything.