Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Random Number Generator API

Random integers or decimals in an inclusive range from a cryptographic random source, with or without duplicates (unbiased at any range size), optionally sorted.

POST /api/v1/tools/random-number-generatorMCP random_number_generatorGeneratorsRandom output

Generate random numbers between any min and max, up to 10,000 at once, with or without duplicates, sorted, or with decimals. Uses secure browser randomness.

Input

Send these as a JSON object. Unknown fields are rejected.

min
Lowest possible value (inclusive). (number, -9007199254740991 to 9007199254740991, default 1)
max
Highest possible value (inclusive). (number, -9007199254740991 to 9007199254740991, default 100)
count
How many numbers (1 to 1000). (integer, 1 to 1000, default 1)
mode
integer or decimal. (string, one of integer, decimal, default "integer")
places
Decimal places in decimal mode (1 to 10). (integer, 1 to 10, default 2)
allowDuplicates
Allow the same number more than once. false draws without replacement, like a lottery. (boolean, default true)
sort
Order of the results. (string, one of none, asc, desc, default "none")
curl https://pithlab.com/api/v1/tools/random-number-generator \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"min":1,"max":49,"count":6,"allowDuplicates":false,"sort":"asc"}'