A Primary Password adds an extra layer of security to Firefox by protecting your saved logins. Even if someone gains access to your device, they won’t be able to view or use your stored passwords without entering your Primary Password. This ensures that your most sensitive information—such as banking and email credentials—remains protected from unauthorized access.
If you share a computer with anyone, it is strongly recommended that you use a Primary Password.
Multiple devices/profiles: Primary Passwords are set locally and are not synced between profiles or devices. If you use more than one device or profile, those use separate Primary Passwords.
- For other privacy issues related to sharing a computer, see How do I share Firefox between people on a computer?
Important: After you have defined and set your Primary Password, you will be prompted to enter it once for each Firefox session, when Firefox needs access to your stored passwords. This also applies if you want to add, remove or show a password.
Table of Contents
How Firefox stores and protects your saved passwords
Firefox saves your passwords in two small files inside your Firefox profile folder:
- logins.json – contains your encrypted usernames and passwords
- key4.db – stores the encryption key used to protect those logins
Firefox’s built-in cryptography library, Network Security Services (NSS), protects these files. If you set a Primary Password, Firefox will use it to encrypt the key in key4.db.
Password encryption in Firefox
Firefox uses the local encryption method for saved logins.
| Change | Old | New |
|---|---|---|
| Encryption algorithm | 3DES-CBC | AES-256-CBC |
| Key size | 112 bits | 256 bits |
| Purpose | Local protection of passwords stored on disk | Stronger, modern encryption standard |
- AES (Advanced Encryption Standard) is faster and much more secure than 3DES.
- This change improves the protection of your passwords locally, on disk.
- Firefox Sync uses end-to-end encryption with AES-256-GCM and is unaffected.
This upgrade happened automatically; your saved logins were re-encrypted in the background when you updated Firefox.
Create a Primary Password
By default, Firefox does not use Primary Passwords (formerly known as Master password) to protect stored credentials. To define a Primary Password:
- Click the menu button
to open the menu panel.
- Click .
Click the Firefox logins menu
, then click .
- The Firefox Settings panel will open to the Logins and PasswordsPasswords section.
- Put a checkmark next to Use a Primary Password to open the Change Primary Password dialog.
- Enter your Primary Password. The Password quality meter will indicate the difficulty of guessing your defined password. To create a quality password, your Primary Password should include the following:
- At least one uppercase letter to add complexity.
- Digits embedded within the password, avoiding simple placements at the start or end.
- At least one non-alphanumeric character, such as: @ # $ % ^ & * ( ).
- A configuration that is easy for you to remember but difficult for others to guess, ensuring that you, and only you, can access this secure information.
- For more information on choosing passwords, see Choose a strong password.
- Tip: Avoid common substitutions or sequences that might seem complex but are widely used and easily guessed, such as "Password1!" or "Password@13". Instead, think of a unique phrase or a combination of words that only you can easily recall.
- Enter the password a second time to confirm that you have entered it consistently.
- To set the Primary Password, click .
- Close the page. Any changes you've made will automatically be saved.
Remove the Primary Password
Should you decide you don't need your Primary Password anymore, you can delete it at any time:
- Click the menu button
to open the menu panel.
- Click .
Click the Firefox logins menu
, then click .
- The Firefox Settings panel will open to the Logins and PasswordsPasswords section.
- Remove the checkmark next to Use a Primary Password.
- Enter the current password to confirm your ownership of the account.
- If you've forgotten your Primary Password, see Reset your Primary Password if you've forgotten it.
- Click .
- Click in the dialog that appears to confirm its removal.
- Close the page. Any changes you've made will automatically be saved.
Change the Primary Password
You can also change your Primary Password at any time:
- Click the menu button
to open the menu panel.
- Click .
Click the Firefox logins menu
, then click .
- The Firefox Settings panel will open to the Logins and PasswordsPasswords section.
- Click .
- Enter the current password to confirm your ownership of the account.
- If you've forgotten your Primary Password, see Reset your Primary Password if you've forgotten it.
- Enter the new Primary Password twice.
- Leaving the two fields empty removes your Primary Password.
- To accept the changed Primary Password, click .
- Close the page. Any changes you've made will automatically be saved.
Based on information from Master password (mozillaZine KB)