Skip to content
Generate now

How Random Number Generators Work (and How to Pick Numbers Fairly)

Whether youโ€™re drawing a raffle winner or sampling data for research, fairness depends on how your random numbers are made. Hereโ€™s what happens behind the button โ€” and how to use it well.

Options

Tip: press Enter or Space to generate again.

Ready

Pseudo-random vs cryptographic

Most programming languagesโ€™ default generators (like JavaScriptโ€™s Math.random()) are fast but predictable if someone knows the internal state. Cryptographically secure generators, like the Web Crypto API RandNow uses, draw on operating-system entropy and are suitable even for security purposes.

The hidden problem: modulo bias

Squeezing a large random value into a small range with the remainder operator slightly favours some numbers. RandNow uses 53 bits of randomness per draw and scales it, making every number in your range equally likely.

Practical recipes

  • Raffle: min 1, max = tickets sold, 1 number.
  • Lottery: 6 unique numbers from 1โ€“49, sorted ascending.
  • Random sample: unique numbers to select rows from a dataset.
  • Dice simulation: 1โ€“6 with duplicates allowed.

Pro tips

  • Screen-record the draw for transparent giveaways.
  • Turn on โ€œNo duplicatesโ€ for any lottery-style draw.
  • Use the sum and average shown to sanity-check large batches.

Try a generator

Random Address Generator

Realistic street addresses with valid-format postal codes and phone numbers for 40 countries.

Fake Identity Generator

Complete fictional person profiles: name, birthday, address, phone, email, job and more.

Need random data? Get it now.

Pick any of 144 generators, hit Generate and copy or export the results as CSV, JSON or TXT. No account, no limits, nothing stored.

Start generating โ€” free