How Random Number Generators Actually Work (And Why It Matters)
Not All "Random" Is Created Equal
When you flip a coin app or roll virtual dice, you're trusting that the result is genuinely unpredictable. But under the hood, there are two very different ways a computer can generate that number, and the difference matters more than most people realize.
Pseudo-Random vs. Cryptographically Secure
Most simple scripts use a **Pseudo-Random Number Generator (PRNG)** — a mathematical formula that produces a long sequence of numbers that *look* random but are fully determined by a starting "seed" value. If you know the seed, you can predict every number that follows. That's fine for a video game's background animation, but not for anything where fairness matters.
A **Cryptographically Secure Pseudo-Random Number Generator (CSPRNG)** instead pulls entropy from unpredictable system-level sources (timing jitter, hardware noise) via the browser's `crypto.getRandomValues()` API. There's no seed to reverse-engineer. This is the standard used for security-sensitive randomness, like generating passwords, and it's exactly what powers TinkerHub's dice roller, coin flip, and spin the wheel.
Why This Matters for Fairness
IMPORTANT
> If you're using an online randomizer to settle a bet, pick a winner, or make a decision for a group, the underlying randomness should be unpredictable to *everyone*, including whoever is running the tool.
A predictable PRNG seeded by, say, the current timestamp could theoretically be gamed by someone who knows exactly when the button was clicked. A CSPRNG closes that gap entirely — there's no timing pattern to exploit.
Practical Uses Beyond Games
Randomization tools aren't just for games and giveaways:
Try It Yourself
Our Random Number Generator lets you set a custom range for sampling or decision-making, while the Dice Roller supports the full set of tabletop dice (D4 through D100) for game night. Both use the same secure randomness under the hood — no seeds, no patterns, no shortcuts.