Guides

How Sudoku Puzzles Are Made, and Why One Solution Matters

Every puzzle on this site is made by a program written for it, in your browser, when you open the page. Here is how that program works, step by step, and why it insists on puzzles with exactly one answer.

Step 1: make a finished grid

A puzzle starts life as its own answer. The generator begins with an empty 9×9 grid and fills it like a methodical solver: it picks the empty square with the fewest possible digits, tries those digits in a random order, and backs up whenever it reaches a dead end. Because the order of digits is shuffled, each run produces a different complete, valid grid, with every row, column and box holding 1 to 9 once.

The shuffling comes from a seeded random number generator. Give it the same starting number (the seed) and it produces exactly the same sequence again. That's what makes the daily puzzle work, as you'll see below.

Step 2: take digits away

Next, the generator removes digits from the full grid one at a time, in a random order. After every single removal it asks one question: does this grid still have exactly one solution?

To answer the question, a solver searches for solutions and stops as soon as it finds two. It doesn't need to count them all. Two is enough to know the puzzle would be broken.

Removal also stops at a floor that depends on the level, so a puzzle never gets sparser than intended:

LevelDigits given (at least)Hardest technique needed
Easy38Naked singles
Medium30Hidden singles
Hard26Locked candidates or naked pairs
Expert22Something beyond those

"At least" matters. Sometimes every remaining digit is needed to keep the answer unique before the floor is reached, and then the puzzle keeps a few more.

Step 3: grade it like a person would

The number of givens alone doesn't decide difficulty. A puzzle with many digits can still need a clever step, and a sparse one can be straightforward. So each candidate puzzle goes to a second solver that works the way a person does, always trying the simplest technique first:

  1. Naked singles: a square with only one possible digit.
  2. Hidden singles: a digit with only one possible square in a row, column or box.
  3. Locked candidates and naked pairs, which don't place digits but rule candidates out.

The puzzle's grade is the hardest step this solver had to use to finish. If it can't finish with these steps at all, the puzzle is graded as expert: solving it needs something more, such as a hidden pair, an X-Wing or an XY-Wing.

If the grade doesn't match the level you asked for, the generator starts again with a new full grid. It tries up to 60 times, which in practice is plenty. In the rare case where none matches exactly, it uses the closest one it found.

Why one solution matters

A sudoku with two possible answers isn't just slightly worse. It breaks the game, for three reasons.

That's why the uniqueness check runs after every removal, not just at the end. The puzzle you see is the last one in a long chain that passed every check.

A side note for the curious: mathematicians showed in 2012, with a very large computer search, that a sudoku needs at least 17 givens to have a unique solution. Our puzzles stay well above that, because very sparse puzzles tend to be hard in ways that aren't fun.

How the daily puzzle is the same for everyone

The daily puzzle doesn't come from a server. Your browser turns today's date and the level (for example "2026-10-22, medium") into a seed number, and the generator runs from that seed. Since the same seed always gives the same grid, everyone who opens the medium daily puzzle on that date gets the same puzzle without any puzzle being downloaded. The date is your device's own date, so the new puzzle arrives at your local midnight.

Free-play puzzles on the level pages use a fresh random seed each time, so you get a new puzzle whenever you ask for one.

Killer sudoku works differently

For killer sudoku, the generator makes a full grid, then groups neighbouring squares into small cages with no repeated digit and records each cage's total. Instead of removing digits, it checks whether the cages alone allow exactly one solution. If they don't, it reveals one square where two possible solutions differ, and checks again. Our killer strategies guide explains how to solve them.

What this means when you play

Ready to test it? Start with easy, or try hard if locked candidates are already part of your toolkit.