Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Firefox Primary Password: Protect Saved Logins

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Setting a Primary Password in Firefox encrypts your saved logins and passwords so that anyone who opens your browser profile cannot view or use them without entering the master password. This guide walks you through enabling it on desktop (Windows, macOS, Linux) and notes the mobile limitation. You'll need your Firefox account password if you use sync, and you must be able to sign in to your computer's user account.

What You'll Need

  • A computer running Firefox (desktop version). The Primary Password feature is not available on Firefox for Android or iOS.
  • Your current Firefox account password if you use Firefox Sync (you may be asked to re-authenticate).
  • Your computer's login credentials (to approve the change if your OS prompts).

Step-by-Step

  1. Open Firefox Settings. Click the menu button (three horizontal lines) in the top-right corner, then select Settings (or Options on some versions). On macOS, you can also go to Firefox > Preferences.
  2. Navigate to Privacy & Security. In the left sidebar, click Privacy & Security. The exact label may be slightly different depending on your Firefox version, but it's always under this section.
  3. Scroll to the “Logins and Passwords” section. Look for a checkbox labeled “Use a Primary Password”. If you don't see it, make sure you're not in a private browsing window—this setting is only available in normal browsing mode.
  4. Check the box. Click the checkbox to enable the Primary Password feature. A dialog will pop up asking you to set a password.
  5. Enter a strong password. Type a password that is at least 8 characters long (Firefox recommends longer). You'll need to enter it twice to confirm. Avoid using the same password as your Firefox account or your computer login.
  6. Click OK. After confirming, Firefox will ask you to re-enter your Firefox account password if you use Sync, to verify it's you. Enter it and click OK.
  7. Restart Firefox. Close and reopen Firefox. The next time you try to view saved passwords or use them to autofill, Firefox will prompt you for the Primary Password.

Common Mistakes

  • Using a weak password. A short or guessable Primary Password defeats the purpose. Use a passphrase or a password manager to generate a strong one.
  • Forgetting the Primary Password. If you forget it, Firefox cannot recover it. You'll lose access to all saved passwords (though you can reset it by deleting the password file, but that removes all saved logins).
  • Enabling it on mobile. The Primary Password feature is not available on Firefox for Android or iOS. If you try to find it there, you won't. It's desktop-only.
  • Not re-entering your Firefox account password. If you skip the re-authentication step, Firefox may not fully enable the feature, or you might get logged out of Sync unexpectedly.

Tips

  • Use a password manager. Even with a Primary Password, consider using a dedicated password manager (like Bitwarden or KeePass) for even stronger encryption and cross-device sync. Firefox's built-in password manager is basic.
  • Write down your Primary Password. Store it in a secure place (like a safe or a password manager's emergency sheet). If you lose it, you lose all saved passwords.
  • Set a timeout. Firefox will ask for the Primary Password after a period of inactivity. You can adjust this in the same settings area by clicking “Settings” next to the Primary Password checkbox (if available). The default is 5 minutes, but you can change it to 1 minute or 30 minutes.
  • Use a separate Firefox profile. If you share a computer, creating a separate Firefox profile for each user is a better practice than relying solely on a Primary Password.

Troubleshooting

I don't see the “Use a Primary Password” checkbox. This setting is only available in Firefox desktop. If you're on mobile, it won't appear. Also, ensure you're not in Private Browsing mode. If you still can't find it, update Firefox to the latest version.

Firefox asks for my Primary Password every time I start it. That's normal. The prompt appears when Firefox needs to access saved logins. If you want it to ask less often, increase the timeout in the settings (but that reduces security).

I forgot my Primary Password. Firefox cannot recover it. You have two options: If you have a backup of your profile folder, you can restore it from before you set the password. Otherwise, you must reset it by deleting the key4.db and logins.json files in your Firefox profile folder. This will remove all saved passwords. To do this: type about:profiles in the address bar, find your profile, click “Open Folder” (or “Show in Finder” on macOS), close Firefox, then delete those two files. When you restart Firefox, it will create new ones, and you'll have no saved passwords.

Firefox is not asking for the Primary Password even though I enabled it. This can happen if you didn't restart Firefox after enabling. Close all Firefox windows and reopen. If it still doesn't ask, go back to Settings > Privacy & Security and confirm the checkbox is still checked. If it is unchecked, re-enable it and restart again.

I can't sign in to Firefox Sync after setting a Primary Password. That's expected. Firefox will ask for your Primary Password first, then your Firefox account password. If you're stuck, sign out of Sync, restart Firefox, then sign back in. Make sure you enter the Primary Password when prompted.

Frequently Asked Questions

Does a Primary Password protect my passwords from malware?

No. If malware is running on your computer, it can capture the password when you type it or read it from memory. A Primary Password only protects against someone who has physical access to your computer and tries to view saved passwords without your knowledge.

Can I use a Primary Password on Firefox for Android?

No. The Primary Password feature is only available on desktop versions of Firefox. On mobile, you can use a device lock or a third-party password manager instead.

What happens if I forget my Primary Password?

Firefox cannot recover it. You'll need to reset it by deleting the key4.db and logins.json files in your profile folder, which will erase all saved passwords. You can also restore from a backup if you have one.

Will the Primary Password protect my saved credit card numbers?

No. The Primary Password only protects saved logins and passwords. Credit card information is stored separately and is not encrypted by the Primary Password. For that, you'd need to use a separate payment protection feature or a dedicated password manager.

Can I change or remove the Primary Password later?

Yes. Go to Settings > Privacy & Security, uncheck the “Use a Primary Password” box, and enter your current Primary Password to confirm. To change it, uncheck, then re-check and set a new one.

Does a Primary Password prevent websites from seeing my saved passwords?

No. Websites you visit can still see the passwords you type into their forms. The Primary Password only protects the saved password list from being viewed by someone using your Firefox profile.