Skip to main content
Generator Hut

Random Number Generator

Set any minimum and maximum and draw as many numbers as you need.

Generator settings

Between 1 and 10,000.

Both ends are included in the results. Negative numbers are allowed.

No number repeats within a batch.

Generated numbers

Your numbers will appear here. Press Generate to start.

Pick any minimum and maximum and generate random numbers between them. This is the general-purpose tool: use it to draw a winner, pick a page number, assign teams, sample rows from a dataset, or produce a batch of values in a range no fixed-width generator covers. Negative numbers and very large ranges are both supported.

Why use this tool?

Any range you like

Minimum and maximum are yours to set, including negative values and ranges up to a quadrillion wide.

Duplicates on or off

Sampling with replacement or without — one checkbox switches between them.

100% private

Generation happens in your browser using the Web Crypto API. Nothing is sent to a server, nothing is logged, and there is no analytics script watching what you produce.

Built for batches

Draw a single winner or 10,000 sample values, sort them, and export the lot as CSV or JSON.

How this random number generator works

Numbers come from the Web Crypto API, which draws on the operating system's cryptographically secure entropy pool. Unlike Math.random(), its output cannot be reproduced by someone who has seen earlier results — which is what makes it safe to use for a public draw.

Mapping raw entropy onto an arbitrary range is where most generators quietly go wrong. Taking a random 32-bit value modulo your range makes the lowest numbers slightly more likely whenever the range is not a power of two. This tool discards draws that land in that uneven remainder and redraws, so the distribution is genuinely uniform across whatever bounds you set.

For ranges wider than 2^32 the generator composes a 53-bit value from two draws, keeping results exact integers rather than drifting into floating-point imprecision.

How to use it

  1. Step 1: Set your range

    Enter the lowest and highest numbers you want included. Both ends are inclusive.

  2. Step 2: Choose how many and how

    Set the quantity, decide whether values may repeat, and pick a sort order.

  3. Step 3: Generate

    Press Generate, then copy a single value, copy them all, or export the batch.

Example usage

Picking a giveaway winner
Range 1 to 4,812 with a quantity of one — the entrant at that row number wins, and the draw is reproducible in front of an audience.
Sampling a spreadsheet
Fifty unique numbers between 2 and 1,001, sorted ascending, used as the row numbers to audit.
Assigning turn order
A unique number per participant with duplicates blocked, so nobody shares a slot.

Frequently asked questions

Can I generate negative numbers?

Yes. Set a negative minimum — for example -50 to 50 — and the full range is drawn from uniformly. Zero-padding is not applied to negative values.

Are both the minimum and maximum included?

Yes, both ends are inclusive. A range of 1 to 100 can return 1 and can return 100, and each has the same chance as any other value.

What is the difference between unique and non-unique?

Unique mode is sampling without replacement: once a number is drawn it cannot appear again in that batch, so you can never ask for more values than the range holds. With unique off, every draw is independent and repeats are expected — roughly as often as probability says they should be.

How large a range can I use?

Up to a quadrillion values wide, which stays within JavaScript's exact-integer limit. Beyond that, results could no longer be guaranteed exact.

Is this suitable for a prize draw or lottery?

The randomness is cryptographically secure and unbiased, which is the technical bar. Whether it satisfies a regulator is a separate question — formal lotteries usually require an audited, certified system with a verifiable record of each draw.

Browse every tool in Random Number Generators & Number Tools.