Skip to content

Random Number Generator

Generate cryptographically random numbers with configurable range, count, uniqueness, and sorting

Real Random, Not Math.random()

You’re picking lottery numbers. Or selecting random sample indices from a dataset for a research study. Or generating dice rolls for a game prototype. Whatever it is, you need numbers that are actually unpredictable — not the pseudo-random output of Math.random() that could theoretically be reverse-engineered.

This tool uses crypto.getRandomValues() to generate integers or decimals within any range. It supports unique mode (no repeats — like drawing balls from a lottery machine), sorted output, and batches of up to 100 numbers.

Quick Examples

Lottery picks: 6 unique integers, range 1-49, sorted. You get something like 3, 12, 27, 31, 38, 44.

D&D damage rolls: 1 integer, range 1-12. Click generate repeatedly for each roll.

Statistical sampling: 20 unique integers, range 1-500. Those are your sample indices from a dataset.

Random decimal: 1 decimal, range 0-1. Useful for probability experiments or weighted random selection.

Unique Mode = Sampling Without Replacement

When unique mode is on, no number repeats in the batch. It’s like drawing balls from a bag without putting them back. The range has to be at least as large as the count — you can’t get 10 unique numbers from a range of 1-5.

Without unique mode, duplicates are possible. Each number is independently random, so 1-100 with 10 numbers might include the same value twice. For most use cases, that’s fine. For lottery-style draws, turn on unique mode.

Where People Use This

Research. You need 30 random participant IDs from a pool of 200 for a study. Unique mode, range 1-200, count 30. Each participant has an equal chance of selection.

Game development. Procedural generation, loot tables, critical hit chances — all need random numbers. The cryptographic quality here is overkill for games, but it won’t hurt.

Teaching probability. Roll a die 100 times and tabulate the results. Or generate 50 random numbers between 1-100 and plot the distribution. Students can see randomness in action.

Software testing. Generate random inputs to stress-test edge cases. Random integers at boundary values (near max/min of the range) reveal bugs that fixed test data misses.

The List Randomizer shuffles text items instead of generating numbers. The Random String Generator produces alphanumeric identifiers. All generation runs in your browser.

random number generator dice crypto

Related Tools

More in Data Tools