Generate cryptographically secure random numbers, roll dice, flip coins, shuffle lists, and create PINs. Everything runs in your browser using crypto.getRandomValues() for true randomness. Nothing is sent to a server.
Last updated: March 2026 | Free to use, no signup required
A random number generator (RNG) is a tool that produces numbers with no predictable pattern. Each output is independent of the last. The generator on this page uses your browser's built-in cryptographic API, which draws entropy from your operating system's random source, such as hardware interrupts, mouse movements, and timing jitter. The result is a sequence of numbers that cannot be predicted or reproduced, even by someone who knows the algorithm.
RNGs fall into two categories: those that produce a single number within a range and those that produce sequences. This tool handles both. You can generate a single number between 1 and 100 or produce 1,000 unique numbers in any range you choose. The output format is flexible. Results can be copied as plain text or exported to CSV for use in spreadsheets, scripts, or data analysis workflows.
This tool calls crypto.getRandomValues(), a Web Crypto API method available in all modern browsers. The function fills a typed array with cryptographically strong random bytes. To produce a number within a specific range, the tool converts these bytes into an integer and maps it to the requested interval using rejection sampling. Rejection sampling avoids the modulo bias that occurs when you simply take a random integer modulo N. That bias, while small for large ranges, becomes noticeable when the range does not evenly divide the byte space.
For the dice roller and coin flipper, the same underlying function is used. A d6 roll maps to the integers 1 through 6. A coin flip maps to 0 or 1. The list shuffler implements a Fisher-Yates shuffle, where each swap position is chosen using a cryptographically random index. Fisher-Yates produces a uniform distribution over all possible permutations when the random source is unbiased.
Pseudo-random number generators (PRNGs) like JavaScript's Math.random() use a deterministic algorithm seeded with an initial value. Given the same seed, they produce the same sequence every time. This is fine for games and visual effects but unsuitable for security, lotteries, or any application where predictability is a risk.
Cryptographic random number generators (CSPRNGs) like crypto.getRandomValues() draw from entropy collected by the operating system. On modern hardware, this entropy comes from sources such as CPU instruction timing, interrupt timing, and hardware random number generators built into the processor (Intel's RDRAND, for example). The output passes statistical randomness tests and is considered suitable for generating encryption keys, tokens, and other security-sensitive values.
True random in the physics sense requires measuring quantum events, such as radioactive decay or photon behavior. For practical purposes, a well-implemented CSPRNG is indistinguishable from true random and is what this tool provides.
Random numbers appear in nearly every field that involves uncertainty or fairness:
The coin flipper and list picker cover the simpler cases. The bulk number generator handles scenarios where you need hundreds or thousands of values at once, such as populating a test database or running a simulation.
A fair die gives each face an equal probability. For a d6, each number from 1 to 6 has a 1/6 chance, roughly 16.67%. When you roll multiple dice and sum the results, the distribution shifts from uniform to roughly bell-shaped. Two d6 dice produce sums from 2 to 12, with 7 being the most likely outcome (6 out of 36 combinations, or 16.67%). The extremes of 2 and 12 each have only one combination (2.78%).
The modifier field adds or subtracts a fixed number from the total. Rolling 2d6+3 produces values from 5 to 15, shifting the entire distribution upward by 3 without changing its shape. This matches the standard notation used in tabletop RPGs.
For a d20, each value from 1 to 20 has a 5% chance. The distribution is perfectly flat. Rolling with advantage (roll two d20, take the higher) increases the average from 10.5 to about 13.8. This tool does not implement advantage/disadvantage directly, but you can roll two d20 and take the result you need.
This tool uses the Web Crypto API's crypto.getRandomValues() function, which is a cryptographically secure pseudo-random number generator (CSPRNG). It draws entropy from your operating system's random source, including hardware events and timing data. The output is statistically indistinguishable from true randomness and is the same mechanism browsers use for generating encryption keys and secure tokens.
Yes. Uncheck the "Allow duplicates" option in the Number Generator tab. The tool will then produce a set of unique numbers within your specified range. Keep in mind that the quantity cannot exceed the size of the range when duplicates are disabled. For example, you cannot generate 50 unique numbers between 1 and 10.
No. All processing happens locally in your browser using JavaScript. No network requests are made when you generate numbers, roll dice, flip coins, or shuffle lists. You can verify this by opening your browser's developer tools and monitoring the Network tab. Your generated values and list contents stay on your device.
The dice roller supports d4, d6, d8, d10, d12, d20, and d100. You can roll between 1 and 10 dice at once and apply a positive or negative modifier to the total. These cover the standard dice used in tabletop role-playing games, board games, and probability exercises.
The Number Generator tab supports generating up to 1,000 numbers in a single batch. You can set any integer range, including negative numbers. Results can be sorted, copied to clipboard, or exported as a CSV file. For repeated generation, the statistics panel tracks mean, median, mode, and distribution across all your generated values.
A PIN consists of only decimal digits (0-9), making it suitable for numeric keypads, phone unlock codes, and verification codes. A hex string uses characters 0-9 and a-f, giving 16 possible values per position instead of 10. Hex strings are commonly used for encryption keys, color codes, and memory addresses. The random bytes option produces raw byte values displayed in hexadecimal, useful for generating tokens and cryptographic material.