UTILS.
Private by default
🎰

Lottery Number Generator

Generate sorted unique lottery numbers with optional bonus ball and presets.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Generate sorted, non-repeating lottery numbers with an optional bonus ball in your browser, drawn with crypto.getRandomValues; presets cover popular games.

You set how many numbers to draw, the highest number and an optional bonus range. The main numbers are unique, chosen by a partial Fisher-Yates shuffle fed by crypto.getRandomValues with rejection sampling; Math.random is not used. They are sorted ascending and followed by the bonus, drawn separately from 1 to the bonus maximum. A bonus maximum of 0 turns it off.

The presets fill in 6 from 49 with no bonus, Powerball as 5 from 69 plus a bonus up to 26, Mega Millions as 5 from 70 plus up to 25, and EuroMillions as 5 from 50 plus two different bonus numbers from 1 to 12, then draw. These values are fixed in the page and may not match a game's current rules. Only the EuroMillions preset draws two bonus numbers; editing any box goes back to one. A count or maximum below 1 is raised to 1 and the box shows the value used. Nothing is saved.

Frequently asked questions

Are the numbers unique?
Yes — the main numbers are drawn without repeats and shown in ascending order, just like a real draw.
What do the presets do?
Each preset fills in the count, maximum, and bonus range for a popular lottery such as 6/49, Powerball, Mega Millions, or EuroMillions (which draws two bonus numbers).
What if I ask for more numbers than the range allows?
An error says it cannot draw more unique numbers than the maximum, and nothing is drawn.
Can the bonus ball repeat a main number?
Yes. It is drawn separately from its own range, so it can match a main number.

More tools