T
THINKFORU
Submit Feedback

Random Number Generator: Secure Integers & Decimals

Random Number Generator: Secure Integers & Decimals

Random Number Generator

Save on Google
Number type
Press Generate Numbers to see your result.

Related tools

ToolWhat it does
Random Letter GeneratorGenerate random letters A–Z with vowel, consonant, case and unique-letter options.
Random Word GeneratorGenerate random nouns, verbs and adjectives for games, writing prompts and brainstorming.
Text to Binary ConverterConvert any text or number into 8-bit binary code.
Binary to Text ConverterDecode binary code back into readable text quickly and accurately.
Text Repeater ToolRepeat any word, number or sentence as many times as you need with a custom separator.

Random number reference

Showing 70 of 70 specifications
Number / ValueNumber Type & ClassificationTechnical Specification & MetricsCategory / Scope
1Odd · Neither prime nor composite · Perfect squareBinary 1 · Octal 1 · Hex 0x1 · Roman I · Divisors 1 (1 total) · Digit sum 1Whole number · Integers 1–50
2Even · PrimeBinary 10 · Octal 2 · Hex 0x2 · Roman II · Divisors 1, 2 (2 total) · Digit sum 2Whole number · Integers 1–50
3Odd · PrimeBinary 11 · Octal 3 · Hex 0x3 · Roman III · Divisors 1, 3 (2 total) · Digit sum 3Whole number · Integers 1–50
4Even · Composite · Perfect squareBinary 100 · Octal 4 · Hex 0x4 · Roman IV · Divisors 1, 2, 4 (3 total) · Digit sum 4Whole number · Integers 1–50
5Odd · PrimeBinary 101 · Octal 5 · Hex 0x5 · Roman V · Divisors 1, 5 (2 total) · Digit sum 5Whole number · Integers 1–50
6Even · CompositeBinary 110 · Octal 6 · Hex 0x6 · Roman VI · Divisors 1, 2, 3, 6 (4 total) · Digit sum 6Whole number · Integers 1–50
7Odd · PrimeBinary 111 · Octal 7 · Hex 0x7 · Roman VII · Divisors 1, 7 (2 total) · Digit sum 7Whole number · Integers 1–50
8Even · CompositeBinary 1000 · Octal 10 · Hex 0x8 · Roman VIII · Divisors 1, 2, 4, 8 (4 total) · Digit sum 8Whole number · Integers 1–50
9Odd · Composite · Perfect squareBinary 1001 · Octal 11 · Hex 0x9 · Roman IX · Divisors 1, 3, 9 (3 total) · Digit sum 9Whole number · Integers 1–50
10Even · CompositeBinary 1010 · Octal 12 · Hex 0xA · Roman X · Divisors 1, 2, 5, 10 (4 total) · Digit sum 1Whole number · Integers 1–50
11Odd · PrimeBinary 1011 · Octal 13 · Hex 0xB · Roman XI · Divisors 1, 11 (2 total) · Digit sum 2Whole number · Integers 1–50
12Even · CompositeBinary 1100 · Octal 14 · Hex 0xC · Roman XII · Divisors 1, 2, 3, 4, 6, 12 (6 total) · Digit sum 3Whole number · Integers 1–50
13Odd · PrimeBinary 1101 · Octal 15 · Hex 0xD · Roman XIII · Divisors 1, 13 (2 total) · Digit sum 4Whole number · Integers 1–50
14Even · CompositeBinary 1110 · Octal 16 · Hex 0xE · Roman XIV · Divisors 1, 2, 7, 14 (4 total) · Digit sum 5Whole number · Integers 1–50
15Odd · CompositeBinary 1111 · Octal 17 · Hex 0xF · Roman XV · Divisors 1, 3, 5, 15 (4 total) · Digit sum 6Whole number · Integers 1–50
16Even · Composite · Perfect squareBinary 10000 · Octal 20 · Hex 0x10 · Roman XVI · Divisors 1, 2, 4, 8, 16 (5 total) · Digit sum 7Whole number · Integers 1–50
17Odd · PrimeBinary 10001 · Octal 21 · Hex 0x11 · Roman XVII · Divisors 1, 17 (2 total) · Digit sum 8Whole number · Integers 1–50
18Even · CompositeBinary 10010 · Octal 22 · Hex 0x12 · Roman XVIII · Divisors 1, 2, 3, 6, 9, 18 (6 total) · Digit sum 9Whole number · Integers 1–50
19Odd · PrimeBinary 10011 · Octal 23 · Hex 0x13 · Roman XIX · Divisors 1, 19 (2 total) · Digit sum 10Whole number · Integers 1–50
20Even · CompositeBinary 10100 · Octal 24 · Hex 0x14 · Roman XX · Divisors 1, 2, 4, 5, 10, 20 (6 total) · Digit sum 2Whole number · Integers 1–50
21Odd · CompositeBinary 10101 · Octal 25 · Hex 0x15 · Roman XXI · Divisors 1, 3, 7, 21 (4 total) · Digit sum 3Whole number · Integers 1–50
22Even · CompositeBinary 10110 · Octal 26 · Hex 0x16 · Roman XXII · Divisors 1, 2, 11, 22 (4 total) · Digit sum 4Whole number · Integers 1–50
23Odd · PrimeBinary 10111 · Octal 27 · Hex 0x17 · Roman XXIII · Divisors 1, 23 (2 total) · Digit sum 5Whole number · Integers 1–50
24Even · CompositeBinary 11000 · Octal 30 · Hex 0x18 · Roman XXIV · Divisors 1, 2, 3, 4, 6, 8, 12, 24 (8 total) · Digit sum 6Whole number · Integers 1–50
25Odd · Composite · Perfect squareBinary 11001 · Octal 31 · Hex 0x19 · Roman XXV · Divisors 1, 5, 25 (3 total) · Digit sum 7Whole number · Integers 1–50
26Even · CompositeBinary 11010 · Octal 32 · Hex 0x1A · Roman XXVI · Divisors 1, 2, 13, 26 (4 total) · Digit sum 8Whole number · Integers 1–50
27Odd · CompositeBinary 11011 · Octal 33 · Hex 0x1B · Roman XXVII · Divisors 1, 3, 9, 27 (4 total) · Digit sum 9Whole number · Integers 1–50
28Even · CompositeBinary 11100 · Octal 34 · Hex 0x1C · Roman XXVIII · Divisors 1, 2, 4, 7, 14, 28 (6 total) · Digit sum 10Whole number · Integers 1–50
29Odd · PrimeBinary 11101 · Octal 35 · Hex 0x1D · Roman XXIX · Divisors 1, 29 (2 total) · Digit sum 11Whole number · Integers 1–50
30Even · CompositeBinary 11110 · Octal 36 · Hex 0x1E · Roman XXX · Divisors 1, 2, 3, 5, 6, 10, 15, 30 (8 total) · Digit sum 3Whole number · Integers 1–50
31Odd · PrimeBinary 11111 · Octal 37 · Hex 0x1F · Roman XXXI · Divisors 1, 31 (2 total) · Digit sum 4Whole number · Integers 1–50
32Even · CompositeBinary 100000 · Octal 40 · Hex 0x20 · Roman XXXII · Divisors 1, 2, 4, 8, 16, 32 (6 total) · Digit sum 5Whole number · Integers 1–50
33Odd · CompositeBinary 100001 · Octal 41 · Hex 0x21 · Roman XXXIII · Divisors 1, 3, 11, 33 (4 total) · Digit sum 6Whole number · Integers 1–50
34Even · CompositeBinary 100010 · Octal 42 · Hex 0x22 · Roman XXXIV · Divisors 1, 2, 17, 34 (4 total) · Digit sum 7Whole number · Integers 1–50
35Odd · CompositeBinary 100011 · Octal 43 · Hex 0x23 · Roman XXXV · Divisors 1, 5, 7, 35 (4 total) · Digit sum 8Whole number · Integers 1–50
36Even · Composite · Perfect squareBinary 100100 · Octal 44 · Hex 0x24 · Roman XXXVI · Divisors 1, 2, 3, 4, 6, 9, 12, 18, 36 (9 total) · Digit sum 9Whole number · Integers 1–50
37Odd · PrimeBinary 100101 · Octal 45 · Hex 0x25 · Roman XXXVII · Divisors 1, 37 (2 total) · Digit sum 10Whole number · Integers 1–50
38Even · CompositeBinary 100110 · Octal 46 · Hex 0x26 · Roman XXXVIII · Divisors 1, 2, 19, 38 (4 total) · Digit sum 11Whole number · Integers 1–50
39Odd · CompositeBinary 100111 · Octal 47 · Hex 0x27 · Roman XXXIX · Divisors 1, 3, 13, 39 (4 total) · Digit sum 12Whole number · Integers 1–50
40Even · CompositeBinary 101000 · Octal 50 · Hex 0x28 · Roman XL · Divisors 1, 2, 4, 5, 8, 10, 20, 40 (8 total) · Digit sum 4Whole number · Integers 1–50
41Odd · PrimeBinary 101001 · Octal 51 · Hex 0x29 · Roman XLI · Divisors 1, 41 (2 total) · Digit sum 5Whole number · Integers 1–50
42Even · CompositeBinary 101010 · Octal 52 · Hex 0x2A · Roman XLII · Divisors 1, 2, 3, 6, 7, 14, 21, 42 (8 total) · Digit sum 6Whole number · Integers 1–50
43Odd · PrimeBinary 101011 · Octal 53 · Hex 0x2B · Roman XLIII · Divisors 1, 43 (2 total) · Digit sum 7Whole number · Integers 1–50
44Even · CompositeBinary 101100 · Octal 54 · Hex 0x2C · Roman XLIV · Divisors 1, 2, 4, 11, 22, 44 (6 total) · Digit sum 8Whole number · Integers 1–50
45Odd · CompositeBinary 101101 · Octal 55 · Hex 0x2D · Roman XLV · Divisors 1, 3, 5, 9, 15, 45 (6 total) · Digit sum 9Whole number · Integers 1–50
46Even · CompositeBinary 101110 · Octal 56 · Hex 0x2E · Roman XLVI · Divisors 1, 2, 23, 46 (4 total) · Digit sum 10Whole number · Integers 1–50
47Odd · PrimeBinary 101111 · Octal 57 · Hex 0x2F · Roman XLVII · Divisors 1, 47 (2 total) · Digit sum 11Whole number · Integers 1–50
48Even · CompositeBinary 110000 · Octal 60 · Hex 0x30 · Roman XLVIII · Divisors 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 (10 total) · Digit sum 12Whole number · Integers 1–50
49Odd · Composite · Perfect squareBinary 110001 · Octal 61 · Hex 0x31 · Roman XLIX · Divisors 1, 7, 49 (3 total) · Digit sum 13Whole number · Integers 1–50
50Even · CompositeBinary 110010 · Octal 62 · Hex 0x32 · Roman L · Divisors 1, 2, 5, 10, 25, 50 (6 total) · Digit sum 5Whole number · Integers 1–50
Fair coin flipProbabilityHeads 50% and tails 50%. Each flip is independent, so earlier flips do not change the next one.Probability · Coin
Six-sided dieProbabilityEach face from 1 to 6 has a 1/6 chance, which is 16.67%. Probability of an even number = 3/6 = 50%.Probability · Dice
Sum of two diceProbabilitySeven is the most likely total (6 of 36 combinations = 16.67%). Totals of 2 and 12 each have 1 of 36 combinations = 2.78%.Probability · Dice
Random number 1–10ProbabilityEach integer has a 1-in-10 chance (10%). Probability of an even number = 50%; probability of a prime (2, 3, 5, 7) = 40%.Probability · Range 1–10
Random number 1–100ProbabilityEach integer has a 1-in-100 chance (1%). Probability of a multiple of 10 = 10%; probability of a number divisible by 5 = 20%.Probability · Range 1–100
Repeated draws, same numberProbabilityChance that one chosen number appears at least once in 10 draws from 1–100 with repeats = 9.56% (formula 1 − (99/100)^10).Probability · Repeats
Birthday paradoxProbabilityWith only 23 people there is a 50.73% chance that two share a birthday, which shows why repeated random values appear sooner than expected.Probability · Collisions
Odd vs even in 1–100Probability50 odd numbers and 50 even numbers, so each has a 50% chance in an unrestricted draw from 1 to 100.Probability · Parity
Primes between 1 and 100ProbabilityThere are 25 prime numbers from 1 to 100, so the chance of drawing a prime is 25%.Probability · Primes
Independence and the gambler's fallacyProbabilityEach random draw is independent. A number that has not appeared recently is not “due”, and its probability stays the same.Probability · Independence
Math.random()Developer specReturns a pseudo-random float in [0, 1). V8 uses xorshift128+. It is fast but not cryptographically secure.Developer · Pseudo-random
crypto.getRandomValues()Developer specCryptographically secure random bytes supplied by the operating system. This tool uses it by default and falls back to Math.random() only if it is unavailable.Developer · Cryptographic
Integer range formulaDeveloper specThe classic formula is Math.floor(random × (max − min + 1)) + min. This tool instead draws from a 53-bit source with rejection sampling.Developer · Algorithm
Modulo biasDeveloper specUsing value % n on a fixed-size random number slightly favors small results unless the range divides evenly. Rejection sampling discards values above the largest exact multiple of n.Developer · Unbiased selection
Number.MAX_SAFE_INTEGERDeveloper spec9,007,199,254,740,991 (2^53 − 1) is the largest integer JavaScript represents exactly. This tool accepts minimum and maximum values from −1,000,000,000,000,000 to 1,000,000,000,000,000.Developer · Limits
Decimal numbers and floating pointDeveloper specDecimals are generated as scaled integers and then divided by 10^places, which avoids the uneven spacing of raw floating point values. Results are formatted with toFixed().Developer · Decimals
Unique numbers without repeatsDeveloper specFor ranges up to 200,000 values the tool shuffles the range (Fisher–Yates) and takes the first N. For larger ranges it redraws until N distinct values are found.Developer · Algorithm
Seeded vs unseeded randomnessDeveloper specJavaScript has no built-in seeded generator. Reproducible sequences need a custom PRNG such as mulberry32. This tool is unseeded, so each result is different.Developer · Seeding
IEEE 754 doublesDeveloper specAll JavaScript numbers are 64-bit doubles. Integers are exact up to 2^53 − 1, while decimals such as 0.1 cannot be stored exactly in binary.Developer · Number type
With vs without replacementDeveloper specWith replacement, a value can repeat (Allow duplicates on). Without replacement, each value appears once, like drawing balls from a lottery drum. A 6-of-49 lottery has 13,983,816 combinations.Developer · Sampling

Frequently asked questions

QuestionAnswer
How does the random number generator pick numbers?It uses the browser's crypto.getRandomValues() with rejection sampling, so every whole number in your range has exactly the same chance of being picked. Everything runs in your browser with no server calls.
Is the random number generator truly random?It uses a cryptographically secure source built into your browser, which is unpredictable and suitable for games, giveaways, sampling and most everyday uses. Strictly speaking it is pseudo-random rather than based on physical noise, so it is not meant to replace certified hardware generators for regulated lotteries or gambling.
How do I generate a random number between 1 and 100?Set the minimum to 1 and the maximum to 100, leave the quantity at 1 and press Generate Numbers. Change the quantity to get several numbers at once.
Can I generate decimal random numbers?Yes. Choose Decimal under Number type and pick 1 to 6 decimal places. The tool builds each value from a whole number and divides it, so every possible decimal in the range is equally likely.
Can I generate unique random numbers without repeats?Yes. Turn off Allow duplicates to get unique numbers. If you ask for more numbers than the range contains, the result is capped at the number of available values.
What is the largest range I can use?You can use any minimum and maximum between −1,000,000,000,000,000 and 1,000,000,000,000,000. With decimals, the range is limited so that every value stays exactly representable in JavaScript.