---
title: "Use a Primary Password to protect stored logins and passwords"
section: "support"
canonical: "https://www.waterfox.com/support/primary-password-stored-logins/"
---

A Primary Password encrypts the key that protects your saved logins. Without it, anyone who can copy two files out of your profile folder can read every password you have saved. With it, those files are useless without the password in your head.

If you share a computer with anyone, set one.

<Aside variant="caution">
	Primary Passwords are stored locally and are **not** synced between profiles or devices. Each
	profile has its own.
</Aside>

Once set, you are prompted for it once per session, the first time Waterfox needs your saved passwords — including when you add, remove or reveal one.

## How Waterfox stores your passwords

Two files inside your profile folder hold everything:

- **`logins.json`** — your encrypted usernames and passwords.
- **`key4.db`** — the encryption key that protects them.

Both are handled by Network Security Services (NSS), the cryptography library built into the browser. Saved logins are encrypted with AES-256-CBC.

The catch is that without a Primary Password, the key in `key4.db` is not itself protected by anything you know. Copying both files is enough to recover the passwords. Setting a Primary Password encrypts that key, so the files alone are not enough.

## Create a Primary Password

1. Click the menu button, then select **Settings**.
2. Select **Passwords and autofill**.
3. Under _Additional protections_, select **Use a Primary Password**.
4. Enter your new password twice. The quality meter indicates how hard it would be to guess.
5. Select **OK**.

{/* TODO screenshot: Additional protections section in Passwords and autofill settings */}

{/* TODO screenshot: The Change Primary Password dialog */}

A good Primary Password is long and memorable rather than short and cryptic. A phrase of several unrelated words beats a short string with substitutions — "Password1!" and "P@ssw0rd" are among the first things any cracking tool tries.

## Change the Primary Password

1. Open **Settings** and select **Passwords and autofill**.
2. Under _Additional protections_, select **Change Primary Password**.
3. Enter your current password, then the new one twice.
4. Select **OK**.

## Remove the Primary Password

<Aside variant="caution">
	Without a Primary Password, anyone with access to your profile folder can read your saved
	passwords.
</Aside>

1. Open **Settings** and select **Passwords and autofill**.
2. Under _Additional protections_, turn off **Use a Primary Password**.
3. Enter your current password to confirm.
4. Select **Remove**, then confirm.

## If you have forgotten it

There is no recovery mechanism — that is the point of the design. Resetting the Primary Password discards every saved login along with it, because the key that decrypts them cannot be recovered.

## Related articles

- [Generate a secure password in Waterfox](/support/how-generate-secure-password-firefox)
- [Alerts for breached websites](/support/lockwise-alerts)
- [Manage Waterfox profiles](/support/profile-management)

---

<Aside variant="info" title="Copyright and Licensing">
	Adapted for Waterfox from the original Firefox article [Use a Primary Password to protect stored
	logins and
	passwords](https://support.mozilla.org/en-US/kb/use-primary-password-protect-stored-logins).
	Original content by [Mozilla
	Contributors](https://support.mozilla.org/en-US/kb/use-primary-password-protect-stored-logins#doc-contributors).
	Licensed under the [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/).
</Aside>
