TR

Home / Guides / How to Create a Secure Password: Length, Entropy and 8 Rules

How to Create a Secure Password: Length, Entropy and 8 Rules

Updated: November 6, 2026 · AracMerkezi

▶ Open Password Generator

The most important measure of a secure password is not how complicated it looks but how many guesses it takes to find it, and that number comes largely from length and randomness. The difference between a randomly chosen 12-character password (78.7 bits) and a human-picked "Ahmet1990!" is the difference between hundreds of thousands of years and a tiny fraction of a second (at the hypothetical speed below). This guide explains password strength with bit calculations, shows with numeric examples why a given length is needed, and lists eight practical rules. If you are curious about the difference between hashing and encryption, see the guide What Is a Hash?.

How is password strength measured? The entropy calculation

The strength of a randomly generated password is found with bits = length × log₂(size of character set). Every extra bit doubles the number of guesses.

The average cracking time is 2^(bits−1) / guesses per second, since half of the possible combinations must be tried on average. For a hypothetical attack making 10 billion (10¹⁰) guesses per second:

PasswordBitsAverage cracking time (hypothetical)
8 lowercase letters37.610.4 seconds
8 characters (letters+digits, 62)47.63.0 hours
12 characters (letters+digits, 62)71.55,112 years
12 characters (94 symbols)78.7754,050 years
16 characters (94 symbols)104.958,872,393,786,933 years

The real speed varies greatly with the type of attack and how the site stores the password; the table is for showing orders of magnitude. The lesson is still clear: widening the set helps, but length helps more. Going from 12 to 13 characters adds 6.55 bits, that is, about 94 times as many guesses.

Example 1: A random 12-character password or a "complex" 8-character one?

8 characters from a 94-character set: 8 × 6.55 = 52.4 bits. 12 characters from letters and digits only (62): 12 × 5.95 = 71.5 bits. Dropping symbols and increasing length gave the stronger result: the gap is 19.0 bits.

Example 2: A passphrase made of random words

Each word chosen at random from a large word list (dice lists of 7,776 words are known for this purpose) adds log₂(7776) = 12.92 bits.

The words must really be chosen at random; typing a sentence or song lyric you know does not give the same strength. This method suits the master password of a password manager, the one password you need to memorize.

Example 3: The value of a predictable pattern

"Ahmet1990!" is 10 characters and looks complex on paper. But an attacker tries a name list + year + trailing symbol pattern. Say the name list has 10,000 names, the year range is 100 and the final symbol has 10 options (hypothetical): 10,000 × 100 × 10 = 10,000,000 possibilities = log₂ ≈ 23.3 bits. A random 10-character password of the same length is 10 × 6.55 = 65.5 bits. What decides it is the randomness of the choice, not the apparent complexity.

Example 4: Generating a random password from the command line

You can generate a password on your own machine with a secure random number generator. The commands below were verified by running them; the output differs every time, only the lengths are fixed.

These commands differ from the random module; random is not designed for security, so use secrets for passwords.

Eight rules

  1. Length: For important accounts prefer random passwords of 14–16 characters or more; at least 12 for ordinary accounts.
  2. Make it random: Avoid names, birth years, "123", keyboard sequences and a trailing "!". The Password Generator on this site uses the browser's secure random number generator and does not save the password.
  3. A separate password for each account: A breach puts every account using the same password at risk. The email account is the most critical, because reset links arrive there.
  4. Password manager: You cannot memorize dozens of long passwords; a manager stores them encrypted and you remember a single master password.
  5. Two-step verification: Even if the password is stolen, the second step protects the account. An app-based authenticator is generally safer than SMS.
  6. Do not share or write them down: Banks and official institutions never ask you for a password, verification code or PIN.
  7. Beware of phishing: Check the address carefully and do not click suspicious links.
  8. Change after a breach: Immediately change the password of the affected account and of any other account using the same password.

Common mistakes

Hashing and Base64 are not encryption

Base64 is only an encoding; it does not hide data and anyone can decode it. Hashes such as SHA are one-way and are for data integrity; they are not suitable on their own for storing passwords. Developers who store passwords on a server should use dedicated methods such as bcrypt, scrypt or Argon2.

To produce a strong password use the Password Generator, and to measure strength use the Password Strength Checker. For developers, the SHA Hash Generator, Base64 Encode/Decode and UUID Generator tools are also available.

Note: Cracking times rely on a hypothetical speed and are for orders of magnitude only; the security recommendations are general information.

Frequently asked questions

How many characters make a password secure?

At least 12 randomly generated characters is a good target for ordinary accounts; for critical accounts such as email, banking and a password manager, 14–16 or more is preferred. Each extra character multiplies the number of guesses.

Is a password manager safe?

A trustworthy manager stores passwords encrypted and makes it easy to use a long, unique password for each account. Choose a long, random master password and turn on two-step verification.

Is my password saved in the password generator?

No. The password generator on this site produces the password in your browser using a secure random number generator and does not save it.

Tools mentioned in this guide

More guides

This article is for general information only and is not legal, financial or medical advice. We are not an official institution.