Skip to content
2C2CCallApp

Security guides

Password Security and Hashing Explained

Understand password strength, entropy and hashing in plain language, with a worked example of securing an account and the mistakes developers should avoid.

Updated Nov 18, 2026 · 8 min read

Passwords are still the front door to most of your digital life, and most advice about them is either too vague to act on or too technical to follow. This guide explains what makes a password strong, why length beats complexity, what hashing is and why it matters if you build websites, and how to put it all into practice in about ten minutes.

What makes a password strong

Attackers rarely guess passwords by typing them one at a time. They use software that tries billions of combinations, starting with common words, leaked passwords and predictable patterns such as a name followed by a year. A password is strong when it is long, random and used in only one place. Human-chosen passwords fail on the second count, because people follow patterns, so a generator is a better source than your own imagination.

Entropy: measuring strength

Strength is often expressed in bits of entropy, calculated as the password length multiplied by the base-two logarithm of the number of possible characters. Each additional bit doubles the number of guesses needed. What matters most is length: adding characters grows the total faster than adding exotic symbols to a short password. As a rough guide, a random password of 16 characters drawn from letters, digits and symbols is far beyond practical guessing, while an eight-character password, even a complicated-looking one, is not.

PasswordWhy it is weak or strong
Summer2024!A common word plus a year and a symbol: predictable and quickly guessed
P@ssw0rdSubstitutions are well known to cracking tools
A random 16-character stringNo pattern to exploit, and long enough that guessing is impractical

A real-world example: tidying up a small business’s accounts

Take the owner of a three-person bakery who has used one password, a variation on the shop’s name, for her email, her payment dashboard, her social media and her supplier portal. When a supplier’s site is breached and its customer passwords leak, anyone holding that list can try the same email and password on her other accounts. This is called credential stuffing, and it works precisely because of reuse.

She spends an evening fixing it. She installs a password manager and uses a generator to create a unique random password, 20 characters long, for each account, starting with email, since email can reset everything else. She turns on two-factor authentication for email and payments. She shares nothing by message; the staff access the shared accounts through the manager’s sharing feature. The whole job takes about an hour, and a single breach can no longer unlock the rest of her business. Nothing she did required technical skill, only unique passwords and a place to keep them.

Hashing: what websites should do with passwords

A hash is a fixed-length fingerprint of some input, produced by a one-way function. The same input always gives the same hash, a tiny change gives a completely different one, and you cannot turn the hash back into the original. Websites should never store your password itself. They should store a hash, and when you log in, hash what you typed and compare the two.

Not all hash functions are suitable for this job.

  • MD5 and SHA-1 are broken for security purposes. They remain useful for checksums, for instance to verify a download.
  • SHA-256 and SHA-512 are strong general-purpose hashes, but they are designed to be fast, which helps an attacker who is guessing passwords.
  • bcrypt, scrypt and Argon2 are deliberately slow and include a random salt, and they are the right choice for storing passwords.

A browser-based hash tool is handy for verifying a file or comparing two pieces of text. It is not a substitute for a proper password-storage function in your application.

Habits that matter most

  1. Use a unique password for every account, generated randomly.
  2. Keep them in a reputable password manager.
  3. Turn on two-factor authentication, particularly for email and finance.
  4. Check whether your email appears in known breaches, and change affected passwords.
  5. Be wary of any password generator that sends your result across the internet. The safest ones run entirely in your browser.

Frequently asked questions

How long should my password be?+

Aim for at least 16 random characters for important accounts. A password manager means you never need to remember them.

Is it safe to use an online password generator?+

Only if it generates the password in your browser and does not transmit it. Browser-based generators that use the cryptographic random source are suitable.

Can a hash be reversed?+

Not directly. Attackers instead guess inputs and compare hashes, which is why weak passwords and fast hash functions are risky.

Which hash should I use to store passwords?+

Use a dedicated password-hashing function such as Argon2 or bcrypt, with a unique salt. Do not use MD5, SHA-1 or a plain SHA-256.

More guides

All Guides →

Ready to put this into practice?

Generate a strong password in your browser

Create a random password with your own length and character rules. It runs on your device, so nothing is sent or stored.

🚀 Try the Tool Live Now

Opens the Strong Password & Hash Generator · free to use, no sign-up needed to get started