mytoolstash / fun & random / random-number

$ shuf -i

Random Number Generator

Pick random numbers from any range using the browser's cryptographically secure random source.

Secure vs pseudo-random

This generator uses crypto.getRandomValues() with rejection sampling, so every value in the range is exactly equally likely. Math.random() is fine for games but is neither uniform-guaranteed nor unpredictable.

Common uses

Raffles and giveaways (enable "no repeats"), sampling rows for testing, dice and lottery-style picks, and generating test data ranges.