Skip to content
ohsudo, Home

Password Generator

Strong random passwords, passphrases and hex or Base64 tokens, generated in your browser and never sent anywhere.

● Runs 100% in your browser — nothing you type leaves this page.

Result

Very strong (128 bits of randomness)

🔒 Generated in your browser and never sent anywhere. The page address only holds your options, never a result.

How many

The address bar keeps your options, so you can bookmark them. It never holds a result.

How to use it

  1. Choose a password for something a password manager or a config file will keep, a passphrase for something you have to type or remember, or a token for an API key or an app secret.
  2. Set the length, the number of words or the size, and the characters or format to use.
  3. Copy the result. Press Generate again for a new one, or ask for 5 or 10 at once.

Results come from your browser’s cryptographic random generator (crypto.getRandomValues), without the bias that a plain % would add. Nothing is sent or stored, and the page address only holds your options, so sharing the link never shares a password.

What the options are for

Tokens: hex, Base64 and Base64URL

A token is random bytes written as text, for API keys, session secrets and signing keys. All three formats hold the same randomness, so choose the one the place you’ll paste it into accepts:

Format 32 bytes look like Good for
Hex 64 characters, 0-9 a-f Almost anything; the most compatible
Base64 44 characters, may contain + / = Tools that ask for Base64
Base64URL 43 characters, may contain - _ URLs and file names

32 bytes (256 bits) is a good default. For example, an HS256 JWT secret should have at least that many, and a shorter one can be guessed offline from a single token.

What the strength figure means

It counts the bits of randomness these options really produce, which is exact for a result from this page. It says nothing about a password you make up yourself: Password123! has all the character types and falls in seconds.

Label Bits Time to try every combination at 10 billion guesses per second
Weak under 50 less than 31 hours
Fair 50–69 up to about 3,700 years
Strong 70–99 up to about 4 trillion years
Very strong 100+ longer

The speed is an assumption, for a fast hash attacked offline. Slow hashes such as bcrypt or Argon2 take far longer, and a login form that limits attempts takes longer still.

Command-line equivalents

Terminal window
openssl rand -base64 24 # 192 random bits
openssl rand -hex 32 # a 32-byte hex token
tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 24; echo # letters and digits only
pwgen -s 24 1 # from the pwgen package
Terminal window
$b = New-Object byte[] 24; [Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b); [Convert]::ToBase64String($b)

FAQ

Is it safe to generate a password on a website?

Here, the result is created on your device and never leaves it: open your browser’s Network tab and press Generate again to check that it isn’t in any request. Browser extensions that can read pages can still read this one, and a copied password stays in your clipboard. For the most sensitive secrets, such as a production root password, use your password manager’s generator or openssl on a machine you trust.

Password or passphrase?

Both are strong when they’re random. A six-word passphrase has about 77 bits and is much easier to type, which suits a disk encryption key or a password manager’s master password. Everything else belongs in a password manager, where a long password costs you nothing.

Is this the same as the Base64 tool?

No. The Base64 tool converts text you give it, and anyone can reverse that. Here, the bytes are new and random, and Base64 is just how they’re written down.

Where do the words come from?

From the EFF Long Wordlist by the Electronic Frontier Foundation, under CC BY 3.0 US, without its 4 hyphenated words: 7,772 words, so each one adds about 12.9 bits. The list is public, and that’s fine: the strength comes from the random choice, not from keeping the list secret.

Why don’t capitals add strength to a passphrase?

Because every word gets one, so there’s nothing left to guess. The added digit does count: it adds its value and which word it’s on.

Where should I put the password?

In a password manager, or in your system’s secret store. In a project, keep it in a .env file that git ignores (the .gitignore Generator adds it), not in the code. The Docker Compose Generator already creates one for its services.

I changed the password and now login fails

Check that the application and the database agree. See “password authentication failed” for PostgreSQL, MySQL error 1045, SQL Server error 18456, or Redis NOAUTH.

I changed a signing secret and now tokens fail

Every service has to get the new value, and tokens signed with the old one stop working. See JWT “invalid signature”.

Articles

Learn more

Authentication failed
Databases

MongoDB "Authentication failed": the authSource is usually what's wrong

Fix MongoDB "Authentication failed": set authSource correctly, encode special characters in the URI, check which database holds the user, and handle Docker volumes.

Beginner · 4 min read

ORA-01017
Databases

Oracle "ORA-01017: invalid username/password; logon denied": the real causes

Fix Oracle ORA-01017 "invalid username/password": case-sensitive passwords, the wrong service or PDB, expired and locked accounts, old clients, and getting in as SYSDBA.

Beginner · 4 min read

no pg_hba.conf entry
Databases

PostgreSQL "no pg_hba.conf entry for host": allow this connection, the safe way

Fix PostgreSQL "FATAL: no pg_hba.conf entry for host": read the host, user and SSL in the message, add a narrow rule to pg_hba.conf, reload it, and handle Docker and SSL.

Intermediate · 4 min read

is not allowed to connect
Databases

MySQL "ERROR 1130: Host is not allowed to connect": an account is a user and a host

Fix MySQL ERROR 1130 "Host is not allowed to connect to this MySQL server": see which accounts exist, create one for the right host and grant it access, without root.

Beginner · 4 min read

Peer authentication failed
Databases

PostgreSQL "Peer authentication failed for user": connect the right way, or change pg_hba.conf

Fix PostgreSQL "Peer authentication failed for user": use sudo -u postgres, connect over TCP with -h localhost, or change pg_hba.conf to scram-sha-256 and reload.

Beginner · 4 min read

NOAUTH
Databases

Redis "NOAUTH Authentication required": send the password, the right way for your client

Fix Redis "NOAUTH Authentication required" and WRONGPASS: find the password, send it from redis-cli and your client, set it in a URL, and use ACL users in Redis 6+.

Beginner · 4 min read

jwt expired
Security

JWT "jwt expired" and "invalid signature": how to find out what is wrong with a token

Fix JWT "jwt expired" and "invalid signature": read the exp claim, check clock differences, the secret, HS256 vs RS256 and rotated keys, without turning verification off.

Intermediate · 5 min read

Login failed for user
Databases

SQL Server "Login failed for user" (error 18456): the state tells you why

Fix SQL Server error 18456 "Login failed for user": find the real reason in the log by its state, then fix the password, mixed mode, a disabled login or the database.

Beginner · 5 min read

FATAL: password authentication failed for user
Databases

PostgreSQL "FATAL: password authentication failed for user": find the real reason

Fix PostgreSQL "password authentication failed" and "Peer authentication failed": read the server log, check pg_hba.conf, reset the password, and handle Docker.

Beginner · 6 min read

ERROR 1045 (28000): Access denied for user
Databases

MySQL ERROR 1045 (28000): Access denied for user — find which part is wrong

Fix MySQL "ERROR 1045 Access denied for user": check the user@host account, the password, socket vs TCP, option files, and Docker init passwords.

Beginner · 5 min read