Random Number Generator

A random number generator produces integers across a chosen range using a cryptographically secure source.

Set a minimum and maximum, choose how many values you need, and optionally require that no value repeats. Unique selection uses a sparse Fisher–Yates shuffle, so it completes in one pass with no retry loop even when the requested count approaches the size of the range.

Options

NameTypeDefaultDescription
countinteger10How many records to return, from 1 to 1000.
mininteger1Lowest value, inclusive.
maxinteger100Highest value, inclusive.
uniquebooleanfalseSet to true for values with no repeats.

Use cases

  • Sampling: Pick random rows or identifiers from a known range.
  • Load test inputs: Vary quantities, prices and identifiers in generated requests.
  • Draws and allocation: Select unique winners or shard assignments without repeats.

REST API

GET /api/v1/numbers

curl "https://ukaddressgenerator.org/api/v1/numbers?count=10"
{ "status": "success", "count": 5, "min": 1, "max": 100, "unique": true, "data": [42, 7, 91, 13, 68] }

Frequently asked questions

What happens if I ask for more unique values than the range contains?

The request is rejected with a clear message explaining how many distinct values the range holds, rather than looping forever.

Is the randomness suitable for security purposes?

It uses a cryptographically secure source, but for secrets use the password generator or a dedicated key generator.

Related tools