Cybersecurity

How Password Managers Work and What They Really Protect

A password manager keeps your logins in an encrypted vault that one strong primary password unlocks, and fills them in only on the right site. Here is how that works, where it can fail and how to set one up.

A silver laptop with a keyboard and trackpad

A password manager is a program that generates, stores and fills in your passwords, protecting them in an encrypted store that only one primary password (plus, ideally, a second check) can open. This guide explains what happens inside that store, why security agencies recommend the tools, and where they can still go wrong.

How do password managers work?

At the center of every password manager is a vault. The UK National Cyber Security Centre (NCSC) describes it as an encrypted store holding each credential, usually a username and a password, so that users do not have to remember them. You open the vault with a single primary password, which the NCSC says is normally used to derive the key that decrypts the vault. Encryption here means scrambling data so that it is unreadable without the right key.

Around that vault sit a few features that do most of the day-to-day work:

  • Password generation. The manager can create long, random, unique passwords, shaped to meet each site’s rules.
  • Autofill. A browser extension or app enters your username and password for you.
  • Synchronization. Some managers keep the vault only on one device; others store an encrypted copy on a remote server so it works across phones and computers.
  • Warnings. Many tell you when a password has been reused or has appeared in a known data breach.

The result is that you memorize one strong secret and the software handles hundreds of others. CISA, the US Cybersecurity and Infrastructure Security Agency, describes a manager as an easy-to-use program that generates, stores and even fills in all your passwords.

What happens when you log in to a site?

A typical login looks like this:

  1. You unlock the vault with your primary password, often with a fingerprint or face check on a phone.
  2. You visit a site’s login page.
  3. The manager compares the page’s address with the address saved alongside a credential.
  4. If they match, it offers to fill in the username and password. If they do not, it stays quiet.

Step 3 is the part that matters most for safety. The NCSC says a password saved this way “will only autofill on the correct website.” In its guidance for system owners, the agency adds that a manager should never hand every stored credential to whatever site a user visits, and that managers can spot fake sites better than people can.

Why does autofill help against phishing?

Phishing is the practice of tricking someone into entering their credentials on a fake site. A convincing copy of a bank’s login page can fool a tired human, because the difference may be one character in the address. Software that compares the exact address does not get tired. If the manager does not offer to fill a password on a page you expected it to recognize, that is a useful warning sign.

This is not a complete shield. Someone can still copy a password out of the vault by hand and paste it into a fake page. For a wider look at how these scams are built and spotted, see how to spot phishing.

Where does the vault live?

The NCSC separates two broad designs.

Type Where data is kept Main benefit Main added risk
On-device One device only An attacker needs access to that device Poor fit if you use several devices
Cloud-sync Remote server, used across devices Same logins everywhere Data in transit and takeover of the manager account

For cloud-sync managers, the NCSC recommends multi-factor authentication. It also says the decryption key should not be available to anyone else, including the service provider. In practice that means that if you lose the primary password, the provider may be unable to rescue the vault. Some products offer recovery routes such as trusted contacts, and the NCSC notes that any recovery route is itself something an attacker could try to abuse, so it is worth understanding before you rely on it.

Managers also come built into browsers and devices, or as separate third-party apps. The NCSC says third-party managers may sync across different browsers and devices better than built-in ones. It also says browser-saved passwords are “only as secure as your devices and accounts,” so keeping browser and operating-system updates switched on matters.

Is putting all your passwords in one place a bigger risk?

It is a fair worry, and the agencies do not dismiss it. The NCSC lists the risks plainly: the software may have vulnerabilities, and a manager is an attractive target because one successful attack exposes everything stored in it. Its conclusion is that the benefits outweigh the risks.

The reasoning is easiest to see with illustrative arithmetic. Suppose a person has 30 online accounts.

  • Reusing one password: a breach at any one of the 30 sites exposes the login for all 30, so one failure out of 30 sites is enough.
  • Unique passwords in a manager: a breach at one site exposes only that site’s password. For the other 29 accounts to be at risk, the vault itself or the primary password has to be compromised, and a second check can cover that gap.

So the manager swaps many weak points for one strong, well-defended one. CISA’s advice follows the same logic: use a different strong password for each account, and memorize only the manager’s primary password.

How strong should the primary password be?

Because the primary password protects everything, it deserves the most care. CISA’s older guidance says passwords should be at least 16 characters, and it offers two approaches: a random string of mixed-case letters, numbers and symbols, or a passphrase of four to seven unrelated words. CISA suggests a memorable passphrase for the manager itself. That page sits in CISA’s archive, so treat it as established advice rather than the newest wording.

The NCSC adds the point that matters most for the manager account: turn on two-step verification (2SV, also called two-factor authentication) there too, so that a criminal who learns your primary password still cannot get in. Start with your email account, which the NCSC calls the most important step, because email is usually how other passwords get reset. Our explainer on what multi-factor authentication stops and misses covers the options and their limits.

What mistakes do people make with password managers?

Saving passwords on shared devices. The NCSC says never to save passwords in a browser on a shared public device, such as one in a library or college. On a shared household computer, it advises against saving them if you are unsure who could reach your accounts.

Choosing a weak primary password, or skipping 2SV. This undoes most of the benefit, for the reasons above.

Not planning for a lost primary password. If only you can decrypt the vault, you need to know what recovery options, if any, exist before you need them.

Keeping the old habits. Importing old, reused passwords into a manager does not fix them. The generator and the reuse warnings are there so you can replace weak logins over time, starting with email, banking and other accounts that guard sensitive information.

Treating exports as harmless. The NCSC notes that exported passwords are unprotected, so exporting a vault to a plain file creates exactly the exposure the vault was meant to prevent.

Believing writing passwords down is the safer fallback. The NCSC lists extra risks of written passwords: they can be predictable, anyone with access to the storage location can copy them, and people checking website addresses by hand are more exposed to phishing. Simply hiding them may not be enough.

Do passkeys make password managers obsolete?

Not yet. The NCSC says it recommends passkeys as a first choice of login, using them wherever they are offered; passkeys rely on your device’s unlock method such as a fingerprint, face check or passcode. Where a service does not offer passkeys, the agency’s advice is to keep using a strong, unique password with 2SV. The agency also notes that some managers can help move accounts over to passkeys, which is one reason the two ideas overlap rather than compete. Our guide to how passkeys replace passwords explains the mechanics.

Setting one up: what varies by person

There is no single right product. The NCSC’s own wording is that the best manager is the one that best meets your needs. Things that differ between people include:

  • Devices. Someone who uses one laptop has different needs from someone with a phone, tablet and work computer.
  • Cost. CISA notes that built-in browser managers are free and that paid options exist.
  • Extras. Sharing, breach alerts and recovery contacts vary, and the NCSC does not recommend sharing passwords unless it is unavoidable.
  • Workplace rules. Organizations may mandate, recommend or restrict particular tools, and the NCSC suggests a manager may be unnecessary where single sign-on already limits how many passwords staff must remember.

A sensible order of work: secure your email with a unique password and 2SV, pick a manager and protect it with a strong primary password and 2SV, then replace reused passwords one account at a time, starting with the most important.

A short conclusion: one strong lock instead of many weak ones

Password managers work by moving the memory burden to an encrypted vault and by tying each login to the right website. They are not risk-free, since the vault becomes a high-value target, but the NCSC concludes the benefits outweigh the risks, and CISA’s guidance points the same way. The strongest setup combines a long primary password, a second verification step and, where services offer them, passkeys.

This article is general information, not a substitute for professional security advice.

Sources: UK National Cyber Security Centre; Cybersecurity and Infrastructure Security Agency