Random Number Generator

Generate random integers in any range, random decimal numbers with the decimal places you choose, or random fractions, one at a time or as a list.

What you can do here

How to generate random numbers

Pick a number type, set the minimum and maximum, enter how many numbers you need and press Generate. Leave No duplicates ticked when every value must be unique, such as ticket numbers or seat assignments; untick it when repeats are fine, such as simulated dice rolls. The quick presets load common setups in one click.

Generate random integers

Integer mode returns whole numbers. Both ends of the range are included, so 1 to 6 behaves like a die and 0 to 99,999 gives a random five-digit-or-less integer for sample IDs and test data. Negative ranges such as -50 to 50 work too.

Random integer in a range

To get a single random integer between two numbers, set the minimum and maximum and set How many to 1. Every value in the range has exactly the same chance, because the generator discards the few raw values that would otherwise bias the result towards the low end.

Generate random decimal numbers

Switch the type to Decimal and choose the decimal places. Between 0 and 100 with four places you get values like 57.1942, handy for sample measurements, prices, sensor readings and probability exercises.

Generate random fractions

Fraction mode builds a numerator from your numerator range over a denominator from 1 to the largest denominator you set, for example 29/23. Leave fractions unsimplified so students can practise reducing them and converting improper fractions, or tick Simplify fractions and Proper fractions only for tidy values below 1.

SettingExample outputTypical use
Integer, 1 to 100, 5 numbers, no duplicates17, 83, 4, 62, 39Classroom picks, giveaways
Integer, 0 to 99,99948213Sample IDs, test data
Decimal, 0 to 100, 4 places57.1942Mock measurements
Fraction, numerator 0 to 99, denominator up to 9929/23Fraction practice
Integer, 1 to 49, 6 numbers, sorted3, 11, 19, 27, 40, 46Lottery-style picks

Generate random binary numbers

Set the number base to Binary to see each integer in base 2. The Binary (8-bit) preset draws 0 to 255 and pads to 8 digits, giving values such as 01101001; set the range to 0 to 65,535 and pad to 16 for 16-bit values, or 0 to 1 for a stream of random bits. Tick the prefix option for 0b01101001, the literal format used in JavaScript, Python and C.

Generate random hexadecimal numbers

Choose Hexadecimal for base 16. The Hex (32-bit) preset draws 0 to 4,294,967,295 and pads to 8 digits, for values such as 9F3A07C2. Pad to 2 for random bytes, 4 for 16-bit words or 6 for colour-like codes, and switch uppercase or the 0x prefix on or off. Octal (base 8) is there too. Minimum and maximum are always entered in ordinary decimal.

SettingExample outputTypical use
Binary, 0 to 255, pad 801101001Bit masks, binary-conversion practice
Hex, 0 to 4,294,967,295, pad 89F3A07C2Test IDs, memory addresses, checksums
Hex, 0 to 255, pad 2, prefix0x3CRandom byte values
Octal, 0 to 511, pad 3644Unix file-permission practice

Who uses a random number generator

Teachers call on students fairly, raffle organisers draw winning tickets, developers seed test data and pick random delays, researchers sample records, and friends settle a tie. For regulated lotteries or cryptographic keys, use a dedicated certified system.

Frequently asked questions

How do I generate a random number between 1 and 100?

Leave the type on Integer, set Minimum to 1 and Maximum to 100, set How many to 1 and press Generate. Both 1 and 100 can be drawn.

Can I generate random integers without duplicates?

Yes. Keep No duplicates ticked. The tool will not return more unique numbers than the range contains, so 1 to 10 gives at most 10 unique integers.

How do I generate random decimal numbers?

Choose Decimal as the number type and set the decimal places, from 0 to 10. For example 0 to 100 with 4 places gives values such as 57.1942.

Can it generate random fractions?

Yes. Choose Fraction, set the numerator range and the largest denominator. You can keep fractions unsimplified for practice, simplify them, or limit results to proper fractions below 1.

How many random numbers can I generate at once?

Up to 10,000 per click. Lists can be sorted and separated by new lines, commas or spaces, and Copy puts the whole list on your clipboard.

Are the numbers truly random?

They come from the browser crypto.getRandomValues API with rejection sampling, so every value in the range is equally likely. That is fine for games, draws and test data; use a certified system for regulated lotteries.

Related tools

Random 4-Digit NumberRandom Hex StringPrime Number GeneratorRoll a DiceFlip a CoinRandom Name PickerRandom Letter GeneratorUUID Generator