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.