Firefox Primary Password: What It Is & How to Set It
In this article
Firefox Primary Password (called Master Password in older versions) is an optional security feature that encrypts your saved logins and passwords with a single master key. When enabled, Firefox asks for this password once per session before it can access your saved credentials. To create one: open Firefox, go to Settings > Privacy & Security, scroll to the Logins and Passwords section, check the box for Use a Primary Password, then enter and confirm your new password. Note that menu labels may differ slightly by version, device, or region.
What Is the Firefox Primary Password?
Firefox stores your website logins, passwords, and sometimes credit card info in an encrypted database on your computer. Normally, Firefox can read this data without asking for anything, which means anyone who sits at your unlocked computer could open Firefox and see your saved passwords. The Primary Password adds an extra layer: it encrypts the entire password database with a key derived from a password you choose. Without that password, the data is unreadable, even if someone copies the database file.
This is different from your Firefox Account password. The Primary Password is local to your device and profile; it does not sync across devices. If you use Firefox Sync, your saved logins are encrypted in transit, but the Primary Password protects only the local copy.
How the Primary Password Works
When you enable a Primary Password, Firefox creates a new encryption key using a key derivation function (PBKDF2). This key encrypts your saved logins. Each time you start Firefox and try to use a saved login, Firefox prompts you for the Primary Password. After you enter it once, Firefox remembers it for the rest of that session (until you close Firefox). You can also set Firefox to ask for it every time it needs a password, but the default is once per session.
If you forget the Primary Password, there is no recovery. Firefox cannot reset it for you because the encryption key is derived only from that password. The only way out is to delete your saved logins (which removes the encrypted data) and start over. This is a critical point: if you forget the password, you lose access to all saved credentials.
How to Create a Primary Password (Step-by-Step)
These steps apply to Firefox on Windows, macOS, and Linux. On Android and iOS, the Primary Password is not available; instead, Firefox uses your device's screen lock or biometric authentication (fingerprint, face) to protect saved logins.
- Open Firefox and click the menu button (three horizontal lines) in the top-right corner.
- Select Settings (or Preferences on macOS).
- In the left sidebar, click Privacy & Security.
- Scroll down to the Logins and Passwords section.
- Check the box next to Use a Primary Password.
- A dialog will appear. Enter a strong password in the Enter Primary Password field.
- Re-enter the same password in the Re-enter Primary Password field.
- Click OK.
After that, Firefox will ask for the Primary Password the next time you start it and try to use a saved login. You can change or remove it later by unchecking the same box and entering the current password.
How to Choose a Strong Primary Password
The Primary Password is the single key to all your stored credentials, so it must be strong and unique. Do not reuse a password you use elsewhere. A good Primary Password should be:
- At least 12–16 characters long, ideally longer.
- A mix of uppercase, lowercase, numbers, and symbols.
- Not a dictionary word, name, or common phrase.
- Something you can type accurately, because there is no recovery.
A passphrase of four or five random words (e.g., correct horse battery staple) is often easier to remember and harder to crack than a short jumble of characters. Avoid writing it down near your computer, and consider using a password manager to store it (though that somewhat defeats the purpose of a local-only lock).
Common Problems and Misconceptions
“I forgot my Primary Password – can I reset it?” No. There is no backdoor. If you forget it, you must delete your saved logins. Firefox will ask you to confirm that you want to remove the encrypted data. After that, you can start saving passwords again, but all previous ones are lost.
“Does the Primary Password protect against malware?” No. If malware is running on your computer, it can keylog your password when you type it or read it from memory after you unlock. The Primary Password only protects against someone who has access to your files but not your session.
“Why does Firefox ask for the Primary Password so often?” By default, Firefox asks once per session. If you close and reopen Firefox, it will ask again. Some extensions or features (like password autofill) may trigger the prompt more frequently. You cannot change the frequency in settings; it is tied to the session.
“Is the Primary Password the same as my Firefox Account password?” No. The Firefox Account password is used for sync and Mozilla services. The Primary Password is a separate, local-only password that encrypts your saved logins on that specific device.
Primary Password vs. OS-Level Protection
Your operating system (Windows, macOS, Linux) already has a login password, and Firefox can use that to protect saved passwords on some systems. On Windows, Firefox can use the Windows account credentials (via the Windows Credential Manager) to encrypt saved logins. On macOS, it can use the Keychain. However, these OS protections are transparent to the user – you don't type a separate password. The Primary Password is an additional, Firefox-specific layer that works even if your OS account is compromised (as long as the attacker doesn't have the Primary Password).
If you use a shared computer or leave your computer unlocked frequently, a Primary Password is strongly recommended. If you are the only user and your OS account is already protected with a strong password, the Primary Password adds marginal security but can be annoying. The choice depends on your threat model.
Alternatives and When to Use Them
If you find the Primary Password inconvenient, consider these alternatives:
- Use your OS login: Ensure your Windows/macOS account has a strong password and lock your screen when away. Firefox will use the OS credentials to encrypt saved logins.
- Use a dedicated password manager: Tools like Bitwarden, 1Password, or KeePass store your passwords in an encrypted vault with a master password. They integrate with Firefox via extensions and often offer better cross-platform support and recovery options (like recovery codes).
- Disable password saving: If you don't want to manage a Primary Password, you can set Firefox to never save passwords. You'll have to enter credentials manually each time, but nothing is stored locally.
For most users, a dedicated password manager is more flexible and safer than the Primary Password alone, because it can sync across devices and offers two-factor authentication. However, the Primary Password is a built-in, zero-cost option that works offline.
Frequently Asked Questions
How do I remove the Primary Password?
Go to Settings > Privacy & Security > Logins and Passwords, uncheck Use a Primary Password. Firefox will ask for the current Primary Password to confirm. After removal, your saved logins are no longer encrypted with that password; they rely on OS-level protection.
Does the Primary Password protect my bookmarks and history?
No. It only encrypts saved logins and passwords. Bookmarks, history, cookies, and other data are not protected by the Primary Password.
Can I use the same Primary Password on multiple devices?
Yes, you can set the same Primary Password on each Firefox profile, but they are independent. Changing it on one device does not affect others. There is no central management.
What happens if I forget the Primary Password and I have sync enabled?
If you forget the Primary Password, you cannot access the locally stored logins. However, if you have Firefox Sync enabled, your logins may still be available on other devices where you are signed in. On the locked device, you will need to delete the encrypted data to regain use of Firefox's password manager.
Is the Primary Password sent to Mozilla?
No. It is never transmitted. It is used only locally to derive the encryption key. Mozilla cannot recover it or access your saved logins.