HubTools

PIN Generator

Generate a random numeric PIN. Defaults to 6 digits — slide to 4 or 8 as needed.

How long should a PIN be?

A PIN's security depends almost entirely on how many guesses an attacker gets. Against an ATM card or phone unlock with a 3-attempt lockout, even a 4-digit PIN is fine — there are 10,000 combinations and the attacker exhausts their tries before getting close. Against software with no rate limiting, all PINs are weak: a 4-digit PIN has only ~13 bits of entropy, brute-forced instantly; a 6-digit PIN has ~20 bits, also trivial; an 8-digit PIN has ~27 bits, still seconds. Use this tool when the consuming system enforces a lockout — never as a standalone password. Generated 100% client-side with crypto.getRandomValues().
Generated Password
Enable at least one character type
Very Weak
19.9 bits of entropy
Charset: 10 chars
Estimated crack time: instant(10 billion guesses/sec)
Bulk Generation
Count:
Options
Password Length6
4128
Character Types
Uppercase
(A-Z)
Lowercase
(a-z)
Numbers
(0-9)
Symbols
(!@#$%^&*_+-=)
Exclusions
Exclude Similar
(i,l,1,L,o,0,O)
Exclude Ambiguous
{}<>[]()/\|
Quick Presets

About PINs

PINs are numeric-only short codes — secure only because the consuming hardware limits guess attempts.
  • 4-digit PIN: 10,000 combinations (~13 bits)
  • 6-digit PIN: 1,000,000 combinations (~20 bits)
  • 8-digit PIN: 100,000,000 combinations (~27 bits)
  • Without rate limiting, all PIN lengths fall in seconds to brute force
  • iOS Secure Enclave: locks for 1 min after 6 attempts, escalating to wipe at 10
  • Always pair PINs with a hardware-enforced lockout policy

Frequently asked questions

What length PIN should I generate?
Match what the consuming system requires: ATM cards and most phone unlocks accept 4 digits (because they enforce lockouts after 3–10 failed attempts); banking 2FA codes are usually 6; some enterprise tokens are 8. Going longer than required adds little security if the system already locks out brute-force.