Firefox Settings Location: Where to Find Them
The Firefox settings are stored in a profile folder that varies by operating system. On Windows, it lives under %APPDATA%\Mozilla\Firefox\Profiles; on macOS, ~/Library/Application Support/Firefox/Profiles; and on Linux, ~/.mozilla/firefox.
Background
When you install Firefox, the browser creates a profile to hold all user‑specific data: bookmarks, passwords, extensions, and configuration files. The profile is the container for the settings that control how Firefox behaves. Each profile contains a prefs.js file, an SQLite database for extensions, and a set of directories for caches and temporary files. Understanding the profile structure helps when you need to back up, restore, or modify settings beyond the graphical interface.
How Firefox Stores Settings
Firefox’s preferences are stored in two main places:
- prefs.js – a JavaScript file that records every preference you change in the Options/Preferences panel. It is automatically rewritten by the browser when you close a window, so it is not meant for manual editing.
- about:config – a live view of all preferences, including those that are not exposed in the GUI. You can change values here, and Firefox writes them back to
prefs.js.
Other configuration files in the profile folder include user.js (used by power users to set defaults on startup), extensions.json (extension list), and key4.db (encrypted login data). The profile folder is the single location that holds everything you need to manage Firefox’s behavior.
How to Locate the Settings Folder
Finding the profile folder is straightforward once you know the base path for your operating system. The folder name itself contains a random string followed by the profile name you chose during setup.
- Open Firefox and type
about:supportin the address bar, then press Enter. - In the Application Basics section, locate the entry labeled Profile Folder (Windows) or Profile Directory (macOS/Linux).
- Click the Open Folder button. This launches your system’s file manager and highlights the profile folder.
- Note the path displayed in the file manager’s address bar. It matches the patterns described earlier:
%APPDATA%\Mozilla\Firefox\Profileson Windows,~/Library/Application Support/Firefox/Profileson macOS, and~/.mozilla/firefoxon Linux. - If you prefer command‑line access, you can echo the environment variable:
echo %APPDATA%on Windows,echo $HOME/Library/Application Support/Firefox/Profileson macOS, orecho $HOME/.mozilla/firefoxon Linux.
Within the profile folder, you’ll see a subfolder named something like abc123.default-release. That is the active profile. If you have multiple profiles, each will have its own subfolder.
Common Issues and Fixes
Because the profile folder is critical to Firefox’s operation, errors can arise if it becomes corrupted or misplaced. Below are typical problems and how to resolve them.
- Firefox fails to start – The profile may be corrupted. Use the
Profile Managerby launchingfirefox.exe -P(Windows) orfirefox -P(macOS/Linux) to create a new profile and set it as default. - Missing extensions or themes – The
extensions.jsonfile might be out of sync. Delete the file and restart Firefox; it will rebuild the list from theextensionsdirectory. - Preferences not saving – If
prefs.jsis read‑only, Firefox cannot write changes. Check file permissions and remove the read‑only flag. - Large cache causing slow performance – The
cache2directory can grow. Delete its contents or use theClear Recent Historyoption in the GUI. - Sync issues – Corrupted
logins.jsonorkey4.dbfiles can break Firefox Sync. Re‑encrypt or delete the files and sign in again.
Security and Privacy Considerations
The profile folder contains sensitive data. Protect it with the following practices:
- Encrypt the profile – Use disk‑level encryption (BitLocker, FileVault, or LUKS) to safeguard all files.
- Back up regularly – Copy the entire profile folder to a secure location. Exclude large caches if you want a lightweight backup.
- Control permissions – On Unix systems, set the folder to
700to restrict access to your user only. - Use a strong master password – Firefox’s built‑in master password protects the
key4.dbfile. Enable it underPreferences > Privacy & Security > Logins and Passwords. - Delete unused profiles – Remove old profiles from
about:supportto reduce attack surface.
Alternatives to Manual Editing
While you can edit prefs.js or user.js directly, most users prefer safer methods:
- Use the Options UI – Navigate to
Settings > Generalfor most preferences. This is the safest way to change values. - about:config – For advanced settings, open
about:config, accept the warning, and search for the preference you want. Double‑click to toggle booleans or edit strings. - Profile Manager – Manage multiple profiles, rename, or delete them without touching files.
- Extensions – Install extensions like Firefox Sync or Firefox Lockwise to handle passwords securely.
Frequently Asked Questions
What happens if I delete the profile folder?
Deleting the folder removes all bookmarks, passwords, and extensions. Firefox will create a new empty profile the next time it starts, but you will lose all saved data unless you restore from a backup.
Can I move the profile folder to a different drive?
Yes. After moving the folder, launch Firefox with the -P flag, choose Choose a different profile folder, and point it to the new location. Then set it as default.
Why does Firefox not show my custom settings after a reinstall?
Reinstalling Firefox does not delete the profile folder. If settings are missing, you may have installed the browser into a different user account or used the Portable mode, which stores settings separately.
How do I export my profile for migration?
Compress the entire profile folder (including hidden files) and transfer it to the target machine. Then use the -P flag to point Firefox to the new location.
Is it safe to edit prefs.js directly?
Editing prefs.js is risky because the file is overwritten on exit. Use user.js for persistent changes or rely on the GUI and about:config instead.