Générateur de nombres aléatoires
Random numbers power everything from games and simulations to cryptography and statistical sampling. Our generator produces truly random integers, floats, and sequences using cryptographically secure randomness (CSPRNG via the Web Crypto API), with options for unique sequences, weighted randomness, and Gaussian (normal) distribution.
Résultats
Dernière génération
Cliquez sur Générer pour obtenir des nombres
Cas d'usage courants
À propos de Random Number Generator
Random numbers power everything from games and simulations to cryptography and statistical sampling. Our generator produces truly random integers, floats, and sequences using cryptographically secure randomness (CSPRNG via the Web Crypto API), with options for unique sequences, weighted randomness, and Gaussian (normal) distribution.
Comment l'utiliser
- Set your range (min and max values) and how many numbers to generate.
- Toggle unique mode to generate a non-repeating sequence (like lottery numbers).
- Choose distribution: uniform (default), Gaussian (normal), or weighted.
- See generated numbers with statistical analysis (mean, min, max, std dev).
Formule et méthodologie
Uniform integer: Math.floor(crypto.getRandomValues(new Uint32Array(1))[0] / 2^32 × (max − min + 1)) + min. Gaussian: Box-Muller transform on two uniform randoms: Z = sqrt(-2 × ln(U1)) × cos(2π × U2). Uniform float [0,1): getRandomValues byte / 256, chained for precision. CSPRNG vs Math.random(): crypto API is unpredictable; Math.random() is deterministic given seed.
Cas d'usage courants
- Lottery and raffle: picking winners from a list
- Game development: dice rolls, card shuffles, procedural generation
- Statistical sampling: selecting random survey participants
- Security: generating tokens, nonces, and one-time codes
- A/B testing: random assignment of users to experiment groups
Questions fréquentes
Outils connexes
Tous les outils →Intégrer cet outil sur votre site
Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.