Docomint

Gerador de Números Aleatórios

Gere números inteiros aleatórios em um intervalo, com ou sem repetição, usando aleatoriedade criptográfica.

🔒 Processed on your device

What is a Gerador de Números Aleatórios?

Generates random integers using crypto.getRandomValues() — the same cryptographically secure source of randomness the browser uses for security-sensitive operations — rather than Math.random(), which is fine for a game but has known statistical biases that matter for anything closer to a real draw, giveaway, or lottery pick.

How to use the Gerador de Números Aleatórios

  1. Set a minimum, maximum, and how many numbers you need
  2. Choose whether repeats are allowed
  3. The numbers are generated instantly, on your device, using the Web Crypto API

Formula

Result = min + (secure random integer mod (max − min + 1))

Each number is drawn using the Web Crypto API's cryptographically secure random source, then mapped into the requested range.

Example

Picking 5 unique raffle-ticket winners from a pool of 1–500 (min 1, max 500, count 5, repeats off) returns 5 distinct numbers with no duplicates — switch repeats on to simulate 5 independent dice-style rolls instead, where the same number can come up more than once.

Common mistakes

Frequently asked questions

Is this truly random, or just Math.random()?

It uses crypto.getRandomValues(), the Web Crypto API's cryptographically secure random number source — the same one browsers use for generating encryption keys — rather than Math.random(), which is faster but has documented statistical weaknesses that matter for anything closer to a real drawing or lottery pick.

Can I generate random numbers without repeats?

Yes — set "Allow repeats" to No and each number in the result is guaranteed unique, generated by shuffling the full range and taking the first N values rather than re-rolling and checking for duplicates.

Can I generate decimal (non-whole) random numbers?

No — this generates random integers only. For a random decimal, generate a random integer over a wider range and divide it, or scale it into the decimal range you need.

Is there a limit to how many numbers I can generate at once?

5,000 numbers per run — a cap that keeps the shuffle-based "no repeats" mode fast and prevents accidentally requesting an unreasonably large batch.

Is my numbers uploaded anywhere?

No — Gerador de Números Aleatórios runs entirely in your browser using JavaScript/WebAssembly. Your numbers is never sent to a server.

Related calculators