ForHosting KIT · Developer Utilities

Seeded random number generator in a range

This seeded random number generator returns one pseudo-random integer or floating-point value between your minimum and maximum, including the boundaries.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Supply the same range, seed, and mode later and you receive exactly the same result. That reliable reproducibility makes it useful for test fixtures, simulations, games, demonstrations, and any workflow where an apparently random choice must be replayed or audited. It uses no system randomness, network service, or current time.

Generate a number that you can reproduce

Ordinary random-number tools are convenient until you need to explain or repeat a result. This generator treats the seed as part of the input, so a generated value becomes a reproducible fact rather than a transient accident. Enter an inclusive minimum, an inclusive maximum, and a safe-integer seed. Keep the default integer mode when you need a whole number, such as an index, score, quantity, or test case. Select float mode when a fractional value is appropriate. The response repeats the effective bounds, seed, and mode alongside the generated value, which makes saved output self-describing. If you send the same four inputs from a browser, script, CI job, or API client, the calculation follows exactly the same fixed arithmetic path. This property is especially helpful when a failure depends on a generated input: record the seed with the test report, rerun it later, and inspect the identical case without preserving hidden generator state.

Understand inclusive bounds and validation

Both bounds are inclusive. In integer mode, a range from 1 through 6 can return 1, 6, or any whole number between them. Integer mode requires the minimum and maximum to be safe integers, because JavaScript numbers outside that exact range can silently lose units and make a promised boundary misleading. Float mode accepts any finite numeric bounds and derives a reproducible fraction from 53 mixed seed bits; its normalization permits both endpoints. A range whose minimum equals its maximum simply returns that shared value in either mode. The generator rejects missing values, non-finite values such as Infinity, unsafe seeds, unsupported modes, and integer-mode bounds that contain fractions. It also reports an input error when the minimum exceeds the maximum, instead of silently swapping the values. Explicit rejection is important in automation: reversed configuration should fail visibly rather than produce plausible output from a range the caller did not intend.

Use seeded randomness for repeatability, not security

A deterministic generator is ideal when repeatability is the goal. Use it to choose a stable example for documentation, distribute fixtures across a bounded set, create replayable game scenarios, or feed controlled variation into a simulation. Different seeds generally produce different mixed values, while reusing a seed preserves the result for the same range and mode. The algorithm performs a fixed 64-bit integer mix locally and never reads the clock, operating-system entropy, external storage, or a remote service. That independence keeps results stable and makes each request fast. It also means this capability is deliberately not a security generator. Anyone who knows the algorithm and seed can reproduce the output, so do not use it for passwords, authentication tokens, encryption keys, lottery drawings, regulated selections, or adversarial games. For those jobs, choose a cryptographically secure entropy source with the appropriate operational controls. Here, the seed is a replay key, not a secret.

Replay a generated test case

Store the seed with a failing test and regenerate the same bounded input during debugging.

Create stable demo data

Give examples realistic variation while keeping screenshots, documentation, and builds reproducible.

Run repeatable simulations

Assign known seeds to scenarios so results can be compared and independently reproduced.

What does it cost?

Each API request costs $0.002. You can also run the capability in your browser.

Are the minimum and maximum included?

Yes. Integer and float modes both define an inclusive range, and equal bounds return that exact value.

Will the same seed always produce the same result?

Yes, when the seed, minimum, maximum, and mode are all unchanged.

What happens when the minimum is greater than the maximum?

The request fails with an invalid-input error. The bounds are never silently reordered.

Can I use the result for passwords or security tokens?

No. The algorithm is deterministic and reproducible, not cryptographically secure.

What is the difference between integer and float mode?

Integer mode returns a safe whole number; float mode returns a finite floating-point number within the bounds.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/prob/random-number-range

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/prob/random-number-range \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"min":10,"max":100,"seed":2026}'
{
  "min": 10,
  "max": 100,
  "seed": 2026
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "prob.random_number_range",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →