TextToolbox Instant text & writing tools

New: a random number generator with real rejection sampling, not just a secure source

· TextToolbox

Using crypto.getRandomValues() instead of Math.random() gets you a cryptographically secure source. It doesn’t, by itself, get you an unbiased number in an arbitrary range — turning a raw 32-bit value into “a number from 1 to 6” with a plain % 6 very slightly favors the low end of the range whenever the range doesn’t divide evenly into 2³². The fix is a second step called rejection sampling, and it’s the part most “random number” tools skip.

The random number generator gives you:

Min, max, quantity, and the duplicates setting sync to the URL so you can share a pre-configured link — the generated numbers themselves don’t, since every visit regenerates fresh values and there’d be nothing meaningful to restore.

Also available en español, in italiano, στα ελληνικά, and embeddable with a single iframe.

Share this result