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?
Can I generate decimals?
[min, max).How many can I generate at once?
Is this fair for a giveaway?
Can I reproduce a specific draw?
Related tools
Last updated: 2025-01-15