Guides Security and developers

How to Create Strong Passwords and Keep Your Accounts Safe

What really makes a password strong, how passphrases and password managers help, and how to protect accounts from OTP scams.

Most account break-ins do not involve clever hacking. They happen because a password was easy to guess, was reused from another site that leaked it, or was handed over to a convincing caller or fake website. The good news is that a few habits close almost all of these doors, and none of them require technical skill.

This guide explains how passwords are actually attacked, what makes one strong, why length beats complexity, how passphrases and password managers make strong passwords practical and how to protect your accounts even if a password is stolen.

How passwords are attacked

  • Guessing common passwords. Attackers try lists of the most popular passwords, such as 123456, password and qwerty, along with predictable variations like Pakistan@123.
  • Credential stuffing. When one website is breached, the stolen email and password pairs are tried automatically on email, banking, social media and shopping sites. If you reuse a password, one leak opens many doors.
  • Offline cracking. When a site's database of password hashes is stolen, attackers can try billions of guesses per second on their own computers. Only long, random passwords survive this for long.
  • Phishing and social engineering. Fake login pages, messages and phone calls trick people into typing or reading out passwords and one-time codes.

What makes a password strong

Three qualities matter, in this order:

  1. Unique. Used for one account only, so a leak elsewhere cannot unlock it.
  2. Long. Every extra character multiplies the number of possible passwords.
  3. Random. Chosen by a generator or by dice, not by a human mind, which is far more predictable than it feels.

Strength is often measured in bits of entropy. Each extra bit doubles the number of guesses an attacker needs. For truly random passwords:

Password typeApproximate strength
8 random lowercase letters37.6 bits
4 random words from a 7,776-word list51.7 bits
12 random characters from all 94 keyboard symbols78.7 bits
6 random words from a 7,776-word list77.5 bits
16 random characters from all 94 keyboard symbols104.9 bits

These figures only apply to passwords that are genuinely random. A 12-character password made from a name, a year and a symbol, such as Ayesha1998!!, looks complex but is far weaker, because attackers' tools try names, dates and common substitutions first.

Length beats complexity

Rules that demand one capital, one number and one symbol tend to produce predictable passwords: a word with a capital first letter, followed by a year and an exclamation mark. Modern guidance, including the US National Institute of Standards and Technology's digital identity guidelines, favours length, allows long passphrases and recommends checking new passwords against lists of known breached passwords, rather than forcing complex rules or regular changes.

Passphrases: strong and memorable

A passphrase is several random words joined together, such as lantern-orbit-mango-velvet-crisp. Five or six randomly chosen words are both strong and much easier to type and remember than a jumble of symbols. The words must be chosen randomly; a famous quote, a song line or a sentence about your life is not random. The Password Generator can create random passwords or passphrases in your browser.

Use a password manager

No one can remember dozens of unique random passwords. A password manager remembers them for you, fills them in on the right websites and warns you about reused or weak passwords. Options include the managers built into major browsers and phone operating systems, and dedicated apps. You then need to remember only one strong master password or passphrase, and protect it with two-step verification.

A manager also helps against phishing: it will not fill in your bank password on a look-alike website, which is a useful warning sign.

Turn on two-step verification

Two-step verification, also called two-factor authentication, asks for a second proof of identity after your password, such as a code from an app or a security key. Even if your password leaks, an attacker without the second factor is stopped.

  • Authenticator apps generate codes on your phone and are generally safer than SMS codes, which can be intercepted or redirected through SIM swap fraud.
  • Backup codes let you in if you lose your phone. Store them somewhere safe, such as on paper at home.
  • Messaging apps offer their own protection. WhatsApp's two-step verification PIN, for example, stops someone from registering your number on another phone without the PIN.

Never share one-time codes

One-time passwords (OTPs) are sent to confirm logins and payments. Scammers often phone or message pretending to be from a bank, a mobile wallet, a courier, a telecom company or a government support programme, and ask you to "confirm" a code you have just received. Anyone who asks for your OTP, PIN or password is attempting fraud. Banks and legitimate services do not ask for these. If in doubt, hang up and call the official number printed on your card or on the company's website.

When to change a password

  • Change it immediately if a service tells you it was breached, if you see a login you do not recognise or if you typed it into a suspicious page.
  • No need to change strong, unique passwords on a schedule. Forced regular changes tend to produce weaker, predictable passwords.
  • Check for breaches. Breach notification services such as Have I Been Pwned can tell you if your email address appears in known data leaks.

Security questions

Questions such as "your mother's maiden name" or "the name of your first school" are easy to research on social media. Treat them as extra passwords: give a random answer, store it in your password manager and never use the true answer.

How websites should store passwords

Responsible websites never store your actual password. They store a hash, a one-way fingerprint, created with a deliberately slow algorithm such as bcrypt or Argon2 and a unique random salt for each user. Fast general-purpose hashes like those in the Hash Generator are excellent for checking files but are not suitable on their own for storing passwords. The guide to encoding and hashing explains the difference.

Helping family members stay safe

Parents, grandparents and children are often the easiest targets for scams and account takeovers. Set aside an hour to help: turn on two-step verification for their email, WhatsApp and banking apps, set up a password manager or write their passwords in a notebook kept safely at home, and explain clearly that no real bank or company will ever ask for an OTP or PIN. If family members share an account, such as a streaming service, use the password manager's sharing feature rather than sending the password in a chat, where it stays in the message history.

Common mistakes

  • Reusing one good password everywhere. One leak exposes every account.
  • Using personal details. Names, birthdays, phone numbers and CNIC digits are the first things attackers try.
  • Saving passwords in plain notes or screenshots. Use a password manager instead.
  • Ignoring login alerts. Investigate unexpected login emails and messages straight away.
  • Testing real passwords on unknown websites. The Password Strength Checker on this site runs in your browser and sends nothing, but in general, never type a real password into a site you do not trust.

Privacy

The password generator and strength checker run entirely on your device. Passwords are created and tested in your browser and are never sent to this website or stored.

Free tools used in this guide