Penguin mascot
Generators

Random Number Generator

Need a PIN code, a verification number, or just a number with no pattern to it? Tell the penguin how many digits you want โ€” up to 10 โ€” and it pulls one out of its hat.

Press "Generate"

Each digit is drawn independently with your browser's secure random number generator โ€” leading zeros allowed, so 4 digits can absolutely give you 0472. Nothing leaves this page.

How to use

  1. Choose how many digits you need. Anything from 1 to 10 โ€” 4 to 6 is typical for PIN codes.
  2. Press "Generate". The penguin draws each digit independently with your browser's secure random generator.
  3. Copy it and move on. Hit "Copy" to grab the number, or press "Generate" again for a fresh one.

Getting a number that's honestly random

Humans are terrible random number generators. Asked to pick between 1 and 10, crowds stampede toward 7 and almost never choose the endpoints, which is why "I'll pick a number" is a rigged game before it starts. This picker uses your browser's randomness, which has no favourite numbers, no mood, and no memory of what it picked last time.

Two settings matter. The range: keep it honest โ€” a raffle with 40 tickets wants 1โ€“40, not 1โ€“100 with rerolls. And duplicates: allow them when each draw is its own event (dice-style), disallow them when you're drawing distinct winners or a random order. For anything with a prize attached, pick in front of your audience or screenshot the result with the range visible โ€” a fair draw nobody watched still starts arguments, and the argument is never really about the number.

Frequently asked questions

How do I generate a random 4-digit PIN?

Set the digits to 4 and press "Generate". You'll get a random 4-digit number instantly โ€” leading zeros are allowed, so codes like 0472 can come up, exactly like a real PIN pad.

Can the generated number start with zero?

Yes โ€” and that's on purpose. Each digit is drawn independently from 0โ€“9, so a 4-digit result has a full 10,000 possibilities including ones that start with zero. That's what makes it suitable for PIN codes, where 0472 and 4720 must be equally likely.

Is this random enough for PINs and verification codes?

Yes. Every digit comes from crypto.getRandomValues, your browser's cryptographically secure random number generator, with bias-free sampling โ€” each of the 10 digits is genuinely equally likely. One rule still applies: never reuse a PIN across things that matter, no matter how it was generated.

What's the longest number I can generate?

10 digits โ€” up to 9,999,999,999. That's the cap because it's the sweet spot for human-typed codes like PINs and verification numbers. Need longer identifiers? The UUID Generator has you covered.

Related tools

Keep the momentum going.