Random Number Generator

Cryptographically random integers in any range, with or without duplicates.

Uses your browser's Web Crypto API (crypto.getRandomValues) with rejection sampling to avoid modulo bias — everything runs locally, nothing is sent to a server.

Result

5363303869

For informational and educational purposes only — not professional or technical advice, and not a substitute for consulting a qualified professional about your specific situation. TrueMeasureKit is not liable for decisions made based on these results. See our Terms of Service.

Why crypto.getRandomValues instead of Math.random()

Math.random() is fine for animations or sampling where unpredictability doesn't matter, but it isn't specified to be cryptographically secure — some engines' implementations are theoretically predictable from enough output. The Web Crypto API's crypto.getRandomValues() pulls from the operating system's secure random source, the same one used for generating encryption keys, and this generator applies rejection sampling on top of it so every value in your chosen range is equally likely — a naive modulo would otherwise skew slightly toward smaller numbers.

Frequently asked questions

Is this actually random, or just pseudo-random like Math.random()?

It uses the browser's cryptographically secure random number source (the Web Crypto API) rather than Math.random(), which is suitable for things like drawing raffle winners or generating secure tokens, not just casual randomness.

How does "without duplicates" work for a range?

It draws unique values from the specified range until it has the requested count — which only works if the range contains at least as many possible values as the number of results you're asking for.

Advertisement
Adaptive banner

We use cookies for analytics and to show ads, including personalized ads from Google. You can accept or reject these — the calculators themselves never send your inputs anywhere either way. See our Privacy Policy for details.