Random Number Generator – 5 Modes incl. Dice & Coin Flip
Generate cryptographically secure random results in 5 modes — integers, decimals, dice roller with animated SVG faces, coin flip simulator, and pick-from-list with Fisher-Yates shuffle. Powered by the Web Crypto API. 100% client-side, no data leaves your browser.
Settings
Cryptographically Secure
Uses crypto.getRandomValues() for true randomness, not Math.random().
Visual Dice & Coins
See actual dice faces and coin sides with roll/flip animations.
100% Private
All generation happens in your browser. Nothing is sent to any server.
Included Random Generator Tools
Integer Generator
Set a min, max, and count (up to 100) to generate a batch of cryptographically secure random integers. Includes sum and average statistics.
Decimal Generator
Generate random decimal numbers with a configurable range and precision (1–10 decimal places). Useful for simulations and statistical sampling.
Dice Roller
Roll up to 30 dice with 2–20 sides each. Each die face renders an SVG dot-pattern with a 3D CSS roll animation. Shows sum, average, min, and max.
Coin Flip
Flip up to 30 coins simultaneously with a CSS flip animation and visual gold/purple coin faces. Displays heads/tails counts and percentages.
Pick from List
Paste any list of items (one per line) and pick a random sample. Supports allow-duplicates mode and uses a Fisher-Yates shuffle for fairness.
Who Uses a Random Number Generator
Games & Decisions
Roll dice for board games, flip a coin to settle a debate, or randomly pick a restaurant from a list when no one can decide.
Giveaways & Contests
Pick a random winner from a list of names — use the Pick from List mode with Fisher-Yates shuffle for provably fair selection.
Development & Testing
Generate random integers and decimals for test data, simulations, or seeding algorithms without writing code.
How to Use the Random Generator
Choose a mode
Select Integer, Decimal, Dice, Coin Flip, or Pick from List from the tab bar at the top.
Configure options
Set the range, count, number of dice/sides, or paste your custom list depending on the mode.
Click Generate
Hit the Generate button to get instant cryptographically secure results using your browser's crypto.getRandomValues() API.
Use the results
Read the results, check the statistics (sum, average, etc.), or re-roll for a fresh set.
Why crypto.getRandomValues() Is Better Than Math.random()
Most programming tutorials teach Math.random() as the go-to way to generate random numbers in JavaScript — but it has a significant flaw: it uses a deterministic pseudo-random number generator (PRNG) whose output is predictable if you know the seed or observe enough values. This is fine for shuffling a UI animation but completely unsuitable for anything security-sensitive like lottery draws, password salt generation, or fair giveaway selection. The Web Crypto API's crypto.getRandomValues() uses the operating system's entropy sources (hardware events, timing, interrupt variance) to produce output that is cryptographically unpredictable — the same randomness source used for TLS key generation. Every number generated by this tool uses crypto.getRandomValues()under the hood, which means the results are genuinely unbiased and cannot be predicted from previous outputs. For contests and giveaways in particular, this is an important distinction — using a weak PRNG means in theory a sophisticated observer could predict or bias the outcome.
Fisher-Yates Shuffle – How Unbiased List Picking Works
When you use the Pick from List mode to randomly select items from a list, the underlying algorithm is the Fisher-Yates shuffle (also called the Knuth shuffle), first described by Ronald Fisher and Frank Yates in 1938 and popularized in computing by Donald Knuth. The algorithm works by iterating through the list from the last element to the first, and for each position swapping it with a randomly chosen element from the remaining unshuffled portion. This produces a uniformly random permutation — every possible ordering of the list is equally likely. A naive approach of picking randomly and discarding duplicates introduces subtle biases because some items are more likely to be selected early. The Fisher-Yates shuffle eliminates this bias entirely. Combined with crypto.getRandomValues()for each swap decision, the Pick from List mode produces a selection that is both statistically unbiased and cryptographically unpredictable — making it suitable for public giveaways, classroom random calling, or any use case where fairness matters.
Frequently Asked Questions
- Is this random number generator truly random?
- It uses the Web Crypto API (crypto.getRandomValues()) which is a cryptographically secure pseudo-random number generator (CSPRNG) — the same standard used for cryptographic key generation. All generation is done client-side in your browser.
- How many modes does the random number generator have?
- ToolMint's Random Number Generator has 5 modes: Integer Generator, Decimal Generator, Dice Roller (up to 30 dice, 2–20 sides), Coin Flip (up to 30 coins with animation), and Pick from List (Fisher-Yates shuffle).
- How does the Dice Roller work?
- Choose the number of dice (1–30) and the number of sides per die (2–20). Each die renders with an SVG dot pattern like a physical die and plays a 3D CSS roll animation. Sum, average, min, and max are displayed after every roll.
- What is Pick from List and how is it shuffled?
- Paste a list of items (one per line) — names, options, or any text. Set how many to pick and whether duplicates are allowed. The picker uses the Fisher-Yates (Knuth) shuffle algorithm with crypto.getRandomValues() for an unbiased selection.
- Can I generate random decimals with high precision?
- Yes. In Decimal mode, set the number of decimal places from 1 to 10. You can also generate a batch of up to 100 decimal values at once.
Related Tools
File Size Converter
Convert between 12 file size units including SI decimal (KB/MB/GB) and IEC binary (KiB/MiB/GiB) side by side.
Length Converter
Convert between 12 length units — km to miles, meters to feet, cm to inches — with an all-units comparison table.
Password Generator
Generate cryptographically secure passwords (up to 128 chars) or passphrases with entropy score using Web Crypto API.
Percentage Calculator
Find X% of Y, calculate percentage increase or decrease, and convert marks to percentage.