Random PIN code generator
Generate a random numeric PIN code of any length you choose (up to 20 digits), for a lock code, a door keypad code or a temporary verification code.
How it works
A good-quality random PIN code is essential for a bank card code, a building keypad code or a device unlock code: each digit is drawn independently at random, including leading zeros (for example "0472" is still a valid 4-digit PIN code). This is more reliable than choosing an "easy to remember" code yourself, which is often predictable (birth date, sequence of digits).
Why are leading zeros kept?
A PIN code is a sequence of digits, not a number: "0472" and "4720" are two completely different 4-digit codes. If leading zeros were removed, some generated codes would lose a digit, which would throw off the expected length.
How many digits should I choose for a secure PIN code?
4 digits is the standard for bank cards (10,000 possible combinations), but 6 digits or more is preferable for a device unlock code or a sensitive account, as it greatly increases the number of possible combinations to guess.
100% local processing: generation happens entirely in your browser via WebAssembly.