Pular para o conteúdo principal
Tools Star Hub

Gerador de números aleatórios

Gere inteiros ou decimais aleatórios com crypto.getRandomValues, incluindo sorteios sem repetição.

Carregando ferramenta…

Esta ferramenta roda no seu navegador. Dados, arquivos e valores gerados ficam neste dispositivo. Favoritos e ferramentas recentes, se você usar, guardam apenas nomes de ferramentas no armazenamento local — nunca senhas, documentos ou conteúdo de QR codes. Veja a política de privacidade.

Por enquanto, o guia detalhado desta ferramenta (como usar, exemplos e perguntas frequentes) está em inglês.

What this tool does

Draw 1 to 200 integers or decimals between bounds you set. Use it for a casual draw, such as five unique numbers from 1 to 10. Unique mode works only for whole numbers, and asking for more unique values than the range contains is rejected.

How to use

  1. Enter a minimum, maximum and how many numbers to produce.
  2. Choose integer or decimal. Optionally require unique integers.
  3. Generate, then copy the results.

Examples

  • Five unique integers from 1 to 10

    The tool draws without replacement. Asking for 11 unique values in that range is rejected.

  • Decimals

    Values are rounded to six decimal places from a 32-bit unit interval. Unique mode is not offered for decimals.

How it works

Integers use crypto.getRandomValues() with rejection sampling so each value in the range is equally likely. That avoids a biased modulo. The generator is suitable for casual draws. It is not presented as cryptographic security for every statistical or security use.

Limitations

Each bound has to stay within ±1,000,000,000, and the count has to be a whole number from 1 to 200. Unique mode works only for integers, and it refuses a count larger than the range. Decimals are rounded to six places. This is a casual draw, not a lottery draw or a key generator.

See the disclaimer for what these tools do not cover.

FAQ

Is the Random Number Generator free?
Yes. Drawing integers or decimals in this browser is free, with no signup.
Is this cryptographically secure?
It uses the Web Crypto CSPRNG for each sample, with unbiased integer selection. That is stronger than Math.random(). It is still not a complete design for lotteries, keys, or scientific sampling protocols.
Why can’t I use unique mode with decimals?
Decimals are rounded to a fixed precision, so uniqueness is ambiguous. Use integers when you need a unique set.
How do I pick a random number between 1 and 10?
Set the minimum to 1 and the maximum to 10, keep integers selected, and generate. Each whole number in the range has the same chance.
How do I draw numbers without repeats?
Turn on unique mode. It works for integers, and the count cannot be larger than the number of values in the range.