Generators

How Random Number Generators Actually Work

Learn the difference between true randomness and pseudorandom generation, and why pseudorandomness is fine for almost everything.

Brekzy Team Published September 8, 2026

On this page
  1. True Randomness vs Pseudorandomness
  2. Why Pseudorandomness Is Usually Fine
  3. Common Mistakes
  4. Use the Random Number Generator

Software “randomness” is almost never truly random in the strictest physical sense, and that’s completely fine for the overwhelming majority of everyday uses, understanding the distinction just helps set the right expectations.

True Randomness vs Pseudorandomness

True randomness comes from an unpredictable physical process, like radioactive decay or atmospheric noise. Most software instead uses pseudorandom number generation: a deterministic algorithm, seeded with some starting value, that produces a sequence of numbers statistically indistinguishable from true randomness for practical purposes, without actually being unpredictable to someone who knows the algorithm and seed.

Why Pseudorandomness Is Usually Fine

For games, simulations, sampling, and general everyday randomization, a good pseudorandom generator is entirely sufficient, its output passes every practical statistical test for randomness. Only in specific security-critical contexts (generating encryption keys, for example) does the distinction between pseudorandom and cryptographically secure random generation actually matter.

Common Mistakes

  • Assuming a “random” result can’t repeat. Randomness doesn’t mean “never the same value twice”; getting the same random number, or even the same sequence, twice is entirely possible and doesn’t indicate a bug.
  • Assuming all random number generators are equally suitable for security purposes. A generator that’s perfectly fine for shuffling a game deck may not be suitable for generating something like an encryption key, which needs a cryptographically secure source.
  • Expecting a small sample to look perfectly “even.” True randomness produces clumps and streaks over small samples; a genuinely random sequence doesn’t have to alternate evenly to actually be random.

Use the Random Number Generator

The Random Number Generator generates random numbers instantly within any range you specify.

Try it yourself

Random Number Generator

Try our Random Number Generator →

Frequently Asked Questions

Is computer-generated randomness truly random?

Usually not in the strictest sense. Most software uses pseudorandom generation, a deterministic algorithm that produces output statistically indistinguishable from true randomness for practical purposes.

Does it matter that software randomness isn’t “true” randomness?

For the vast majority of everyday uses, no. It only matters in specific security-critical contexts, like generating encryption keys, where a cryptographically secure random source is specifically required.

Can a random number generator produce the same number twice?

Yes, absolutely. Randomness doesn’t guarantee variety between individual results, repeats are a normal, expected part of genuine randomness.

What is a “seed” in random number generation?

A starting value that determines the entire sequence a pseudorandom generator will produce; the same seed will always produce the same sequence of “random” numbers.

Why do small samples of random numbers sometimes look uneven?

Because true randomness naturally produces clumps and streaks over short sequences; an artificially “even” distribution over a small sample would actually be a sign of non-randomness, not evidence of it.

Explore More

Find the right tool, or keep reading Brekzy's other guides.