Random Generator

Generate random numbers, names, dice rolls, and coin flips.

About Random Generator

All random values are generated using the browser's built-in crypto.getRandomValues() API, which produces cryptographically secure random numbers — the same quality of randomness used for security tokens and password generation. No data is ever sent to a server.

Available generators

  • Random number — generate a random integer within any range you specify. Useful for games, sampling, and simulations.
  • Random name — pick a random first name, last name, or full name from a built-in list. Handy for generating test data or placeholder user profiles.
  • Dice roller — roll one or more dice of any standard polyhedral type (d4, d6, d8, d10, d12, d20) and see the total and individual rolls.
  • Coin flip — flip a fair virtual coin and see heads or tails. Useful for making binary decisions or running probability experiments.

True randomness vs pseudo-randomness

JavaScript's Math.random() is a pseudo-random number generator seeded by the system clock — predictable if the seed is known. crypto.getRandomValues() draws entropy from the operating system's secure random source (e.g. hardware noise, interrupt timing), making it suitable for security-sensitive uses and statistically unbiased for games and simulations.

About the Random Generator

A random generator produces unpredictable values: numbers in a chosen range, names from a list, dice rolls, coin flips. The use cases range from picking a raffle winner to seeding tests to making everyday decisions you cannot face alone. This tool brings several of the most useful random-value operations into one page.

All randomness comes from the browser's cryptographically secure RNG (window.crypto.getRandomValues), which is far more uniform than the default Math.random and is unpredictable in the cryptographic sense.

When randomness matters

Cryptographic randomness is required for passwords, tokens, salts, and any security-sensitive use. Statistical randomness — uniform distribution and independence — is required for simulations, A/B testing seed selection, and survey sampling. For casual uses (picking a name from a hat, rolling dice for a board game) any decent RNG suffices, but using the secure RNG everywhere costs nothing extra.

Random numbers are not "random" forever

A sequence of perfectly random outputs will occasionally produce streaks that look non-random — five heads in a row, the same number twice in five tries. This is normal, not a bug in the RNG. The "gambler's fallacy" — that past outcomes affect future ones — is one of the most common misunderstandings of randomness.

How to use the Random Generator

  1. Choose the type

    Number, dice, coin, or pick-from-list.

  2. Set the parameters

    Min/max for numbers, faces for dice, items for lists.

  3. Generate

    Each click produces a new value. Use bulk mode if you need many at once.

Worked examples

Example 1

Input: Random integer 1–100

Result: 47

Inclusive range — both 1 and 100 are possible.

Example 2

Input: Roll 3 d6

Result: [5, 2, 6] = 13

Three six-sided dice, total shown.

Example 3

Input: Pick 2 names from [Alice, Bob, Carol, Dave]

Result: [Alice, Dave]

Unique selection — no name is repeated.

Real-world use cases

  • Picking a raffle, draw, or contest winner.
  • Generating test data for unit and integration tests.
  • Simulating dice rolls for tabletop games.
  • Choosing a restaurant when the group cannot agree.
  • Producing random sample IDs for surveys or research.

Tips & common mistakes

  • For cryptographic use, prefer the Password or UUID generators — both are tuned for that purpose.
  • When the result feels "rigged", remember randomness produces streaks. Six identical outcomes in a row are unlikely but not impossible.
  • For repeatable randomness (testing), seed your own RNG instead — this tool produces unrepeatable cryptographic randomness by design.

Frequently asked questions

Is the RNG truly random?

It is cryptographically secure, which is the practical definition of random on a deterministic computer. The browser's entropy sources are reseeded with OS-provided randomness.

Can I reproduce a result?

No — the RNG is unseeded. For reproducible test data, use a seedable RNG (Mulberry32, xorshift) in your code instead.

Are the results stored?

No. Refreshing clears everything; the tool does not log outputs.

Related tools

Last updated: June 2026 · All processing happens locally in your browser.