Random Generator
Random numbers, dice, coins, list picks, shuffles, fair teams, dates, strings and UUIDs.
How it works
Generates random whole or decimal numbers (optionally unique), dice rolls such as 3d6+2, coin flips, picks from a list, shuffles, balanced teams (by optional skill), random dates, strings and UUID v4/v7. Uses cryptographic randomness by default; with a seed the output is reproducible so others can verify a draw.
- Without a seed, bytes come from the server's cryptographically secure generator (Node.js crypto.randomBytes); nothing is stored. With a seed, bytes come from SHA-256 in counter mode over the seed, so anyone can reproduce the draw with the same seed and settings.
- Whole numbers in a range use rejection sampling (no modulo bias). Decimals use 53 random bits scaled into [min, max) and rounded to the chosen places. Unique numbers use a partial Fisher–Yates shuffle or Floyd's algorithm for huge ranges.
- Shuffles and picks use Fisher–Yates. Teams: without skills, a random round-robin; with skills, a snake draft over a random order followed by swaps that shrink the gap between the strongest and weakest team.
- UUID v4 has 122 random bits; UUID v7 has a 48-bit Unix millisecond timestamp and 74 random bits (RFC 9562).
Seeded output is predictable by design. For passwords or keys, leave the seed empty (or use a dedicated password generator on your own device).
Sources
- RFC 9562: Universally Unique IDentifiers (UUIDs) (IETF)
- Knuth, TAOCP Vol. 2, §3.4.2 (random sampling and shuffling) (Addison-Wesley)
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
Fieldday Sports club & training organiser
Fixtures, brackets, ratings and training plans for your club — in one workspace.
Related tools
- Elo/Glicko Rating Lab – Rate players from game results with Elo, Glicko-1 and Glicko-2; history chart and win odds.
How to use the Random Generator
Draw random numbers, dice rolls, picks, shuffles, fair teams, dates, strings and UUIDs — and use a seed when others need to verify the draw.
What it is for
Random draws come up all the time: picking a giveaway winner, rolling dice when the real ones are missing, dividing a five-a-side game into fair teams, generating test data or a few UUIDs. This generator covers those in one place: whole and decimal numbers (optionally without repeats), dice notation like 3d6+2, coin flips, picks from a list, shuffles, balanced teams, random dates, random strings and UUID v4/v7.
By default it uses cryptographically secure randomness and nothing is stored. The optional seed turns it into a reproducible draw: the same seed and settings always give the same result, so anyone can re-run it and confirm you didn't cheat.
Worked example
A lottery-style draw of 6 unique numbers from 1 to 49 with the seed draw-2026-10-18 gave:
12, 4, 13, 47, 6, 14
The result also shows sum 96, mean 16, minimum 4 and maximum 47, and confirms that no number repeats. Because a seed was used, a callout states that this seed with the same settings always produces this exact list.
Two more examples:
- Dice
4d6+2, 5 rolls, seeddemo: 22, 15, 19, 18, 14. The table shows each roll's individual dice (the first was 4 + 4 + 6 + 6 + 2) and the possible range of 6–26, average 16. - Teams by skill: Ana 8, Ben 5, Cleo 9, Dev 4, Eli 6, Fay 7 into 2 teams, seed
friday. Team 1: Cleo, Eli, Ben (total 20). Team 2: Ana, Fay, Dev (total 19). A gap of just 1 point.
How to read the result
- Results is the list in the order drawn. For picks and lotteries, the order can matter (first prize, second prize).
- The metrics (count, sum, mean, min, max) help you spot a mistake in your settings, such as a wrong range.
- Dice tables show every die, not just the total, so the roll can be checked.
- Teams list members with total and average skill. The gap between totals is the fairness measure.
- Download as text gives one value per line for spreadsheets or scripts.
Tips and common mistakes
- For a public draw, announce the seed rule before drawing, for example the date plus a lottery result that isn't known yet. A seed you choose afterwards proves nothing.
- Never use seeded output for passwords, tokens or keys. Anyone with the seed can reproduce them. Leave the seed empty for anything secret.
- "No repeats" needs a range at least as large as the count: you can't draw 60 unique numbers from 1 to 49.
- For teams, write
name, skillon each line. Without skills the split is random round-robin, which can be unfair by chance. - Use the "unambiguous" character set for codes people must type: it avoids look-alikes like 0/O and 1/l.
- UUID v7 starts with a timestamp, so v7 IDs sort by creation time. Use v4 when the ID shouldn't reveal when it was made.
FAQ
Is this truly random?
Without a seed it uses the server's cryptographically secure generator, which is suitable for draws and games. With a seed it is deterministic by design.
Is every number equally likely?
Yes. Whole numbers use rejection sampling, which avoids the small bias that the common "modulo" shortcut introduces.
Can I prove a giveaway was fair?
Publish the seed method in advance, then the seed, the settings and the result. Anyone can enter the same values and get the same winners.
Can I roll dice with modifiers?
Yes. Use standard notation such as 2d20, 4d6+2 or d100.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://randomgenerator.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://randomgenerator.usefulweb.site/mcp· tool namerandom_generator
Example request
curl -s -X POST https://randomgenerator.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"mode":"integers","count":6,"min":1,"max":49,"unique":true,"seed":"draw-2026-10-18"}'