Skip to content
TypeParser
All tools

Random Number

Cryptographically random numbers.

beats random.org edge: No-repeats + crypto random
options
min
max
count
Guide

About Random Number

Cryptographically random numbers in any range. Pick min, max, count, integer or decimal, with optional no-repeats. Uses <code>crypto.getRandomValues</code> for unbiased output — no predictable pseudo-random sequences. Useful for fairness-sensitive use (lottery picks, A/B test seeds) and for development scenarios where reproducibility matters less than security.

When you need real random

  • Lotteries and raffles — observable bias breaks trust
  • A/B test bucketing — biased seeds skew results
  • Mock data with realistic distribution — for stress tests
  • Cryptographic salts — covered by Random String
  • Game design — loot drops, encounter chances

For any of those, “good enough” pseudo-random is not good enough. The CSPRNG output behind this tool is what every modern crypto library uses internally.

Common workflows

Pick a winner from a list. Generate 1 random in [1, list_length], count down to the entry. The browser’s CSPRNG is your audit trail — anyone can verify you used the standard primitive.

Sample from a population. Generate N unique random integers in [0, population_size), no-repeats on. Each is an index into your list.

Stress-test with realistic spread. Generate 1000 numbers in your domain — request latencies, page sizes, payloads. Plug into your test harness.

Roll dice for a game. [1, 6] for d6, [1, 20] for d20. Bulk mode for stat rolling.

Decimal vs integer

  • Integer[min, max] inclusive on both ends
  • Decimal[min, max) half-open, configurable precision

Pick integer for counts and indices; decimal for proportions and continuous variables.

Why a tool

Generating random in code is a one-liner if you trust the runtime; a tool is faster when you need a number for a meeting, a giveaway, or a quick prototype. Same primitive, no dependencies, no environment to set up.

Frequently asked questions

How is this random different from <code>Math.random()</code>?
Math.random() is a fast pseudo-random generator — fine for visual effects, terrible for anything where bias or predictability matters. We use the CSPRNG, the same source browsers expose for cryptographic operations.
What does no-repeats do?
Picks N unique values without replacement from the range. Useful for lottery numbers, raffle draws, sampling. If N exceeds the range size, no-repeats becomes impossible — we cap.
Can I generate decimals?
Yes. Set the precision (1-10 digits). Each draw is a uniform random in [min, max).
How many can I generate at once?
Up to 10,000 per click. For larger sets, use the download button.
Is this fair for a giveaway?
Yes — no bias, no patterns. For audited fairness (legal lotteries), pair the generated number with a published seed from a verifiable source (e.g. a future block hash).
Can I reproduce a specific draw?
No — by design. CSPRNG output is unpredictable; that is the property you want for fairness. For reproducible randomness (debugging, simulations), use a seeded library in your code.

Related tools

Last updated: 2025-01-15