Skip to content

Password & Passphrase Generator

Type

Very strong129.0 bitsBrute force at a trillion guesses a second: longer than the age of the universe

Characters

Stays on this device

Keep it safe → Valtou password manager

Make a strong random password, an easy-to-type passphrase or a random PIN. Everything is generated in your browser with its cryptographic random number generator. Nothing is sent or saved.

Keep it safe → Valtou password manager
How it works

How to use the generator

  1. Choose Password for a random string of characters, Passphrase for a few random words, or PIN for digits only.
  2. Adjust the length or number of words. The strength meter updates as you go.
  3. Press Copy and paste the result where you need it. Generate another gives you a fresh one.

For passwords you’ll read off a screen or type on a TV remote, switch on Avoid look-alike characters. This drops I, l, 1, O, 0 and o, so you won’t confuse one for another.

How the passwords are generated

Every character comes from crypto.getRandomValues, the browser’s cryptographically secure random number generator. Math.random is never used. It is designed to be fast, not unpredictable, and its output can be reconstructed from a handful of samples.

Turning a random 32-bit number into a character has a subtle trap. The obvious approach, number % alphabetSize, is slightly biased: 2³² is not a multiple of 88, so the first few characters of the alphabet come up a little more often than the rest. This generator uses rejection sampling instead. Any draw that falls in the uneven final block is thrown away and redrawn, so every character is exactly equally likely. The code is covered by statistical tests that check the output distribution and confirm the check fails for a biased generator.

When several character types are selected, the generator guarantees at least one of each. It does this by discarding whole passwords that miss a type and drawing again, rather than swapping a character in afterwards. That keeps every valid password equally likely.

What “bits of entropy” means

Entropy measures how many equally likely passwords the generator could have produced. Each extra bit doubles the number. A password with 60 bits of entropy is one of 2⁶⁰ (about a quintillion) possibilities, and an attacker has to try half of them on average.

The figure shown here is exact for this generator: it counts every possible output given your settings, including the at-least-one-of-each rule. As a rough guide:

Entropy What it resists
Under 50 bits Online guessing, but not an offline attack on a leaked hash
50–70 bits Most offline attacks on slow, well-salted hashes
70–100 bits Well-funded offline attacks on fast hashes
100+ bits Brute force by any foreseeable computer

The time shown under the meter assumes an attacker making a trillion guesses per second, a realistic figure for a rig of GPUs attacking a fast, unsalted hash. Against a site that stores passwords properly, real attacks are millions of times slower.

Passwords or passphrases?

Random password Passphrase
Example t7]Vq$wE2n!xK9@pLz#d banjo-dwelling-unsaid-ripcord-gusty-thaw
Entropy ~129 bits (20 characters) ~78 bits (6 words)
Easy to type on a phone No Yes
Easy to remember No Reasonably
Best for Anything stored in a password manager Your master password, device logins, Wi-Fi

Passphrases use the EFF long word list: 7,776 common, distinct English words chosen by the Electronic Frontier Foundation to be easy to type and hard to mistake for one another. Each word adds about 12.9 bits. Capitalising words adds nothing, because the attacker knows the rule. Adding a number in a random word adds about 6 bits.

Random PINs

A PIN is short by design: a 6-digit PIN has only a million possibilities, about 20 bits. That’s fine where wrong guesses are limited, such as a bank card that locks after three tries or a phone that slows down after a few. It is not fine for anything an attacker can guess offline, so never use a PIN as a password.

What really weakens a PIN is people’s habits. Studies of leaked PINs found that 1234, 1111 and 0000 alone made up nearly a fifth of all 4-digit PINs, with birth years and keypad patterns such as 2580 close behind. With Avoid common PINs on, the generator skips repeated digits, straight runs like 1234 or 9876, years from 1900 to 2099 and the most common published PINs. It redraws instead of tweaking, so every remaining PIN is equally likely, and the count shown is exact.

Privacy

This page has no analytics, no cookies and no server-side code. The generator never sends anything over the network; the only file it fetches is the word list, and only when you switch to passphrase mode. The page’s Content Security Policy blocks scripts from any other domain.

The EFF word list is © Electronic Frontier Foundation and used under the Creative Commons Attribution 3.0 US licence.

Questions
Is this password generator safe to use?
Yes. The password is created inside your browser tab using crypto.getRandomValues, the same randomness source browsers use for encryption keys. The page makes no network request when you generate or copy a password, and nothing is stored. Once the page has loaded, password mode keeps working with your network switched off; passphrase mode needs to fetch its word list once.
How long should my password be?
For a random password that you store in a password manager, 16 to 20 characters with mixed character types gives 100+ bits of entropy, far beyond what brute force can reach. If you have to remember and type it, a six-word passphrase (about 78 bits) is a better trade-off than a short complex password.
Are passphrases really as strong as random passwords?
Per bit, yes. Strength comes from how many equally likely possibilities there are, not from how strange the result looks. Six words chosen at random from 7,776 give 7,776⁶ possibilities, about 2⁷⁸. That only holds if the words are picked at random, which is why you should use a generator rather than choosing words yourself.
Why does the generator avoid certain symbols?
Quotes, backslashes, backticks and spaces are left out because many sign-up forms reject them or handle them inconsistently, and they cause trouble in command lines and config files. The remaining 26 symbols still add plenty of entropy per character.
Why didn't my clipboard clear after 30 seconds?
Browsers only let a page read the clipboard with permission. Clearing it blind could wipe something you copied from another app in the meantime, so the generator only auto-clears when it can confirm the clipboard still holds the password. It also can't clear anything once you close the tab. If auto-clear isn't available, use the Clear clipboard now button. Clipboard history features such as Windows' Win+V or a clipboard manager keep their own copy, which no web page can remove.
How do I choose a secure PIN?
Let a random generator choose it, and avoid the PINs people pick most, such as 1234, 0000, 2580, repeated digits and years like 1990. Those few hundred PINs cover a large share of real-world choices, so attackers try them first. PIN mode here skips them by default. Use six digits where the device allows it.
Should I reuse a strong password on several sites?
No. When one site is breached, attackers try the leaked email and password on other sites. This is called credential stuffing. A unique password for every account stops one breach from spreading; a password manager makes that practical.

Theme

Colour theme