Skip to content

⚙️ How sudokus are made

In summary: Sudokus are created by first generating a fully filled, valid 9x9 grid, then removing cells one at a time while an algorithm checks, at every step, that the resulting board still has exactly one possible solution.

By Miguel Arechaga

Ever wondered where sudokus come from? Does someone invent them by hand? How do they know there is a solution... and that it is unique? The process is a little marvel of logic, and knowing it even makes you a better solver.

Step 1: a full grid is generated

Every sudoku starts backwards from how you see it: first a completely filled, valid grid is built (81 cells obeying the rules). A computer does it in milliseconds, filling cells at random and backtracking whenever it hits a dead end. There are about 6,670 quintillion valid grids, so we will not run out of sudokus.

Step 2: cells are removed

From that full grid, numbers are removed one by one. And here lies the craft: after each removal something crucial must be checked...

Step 3: the solution must be unique

A proper sudoku has exactly one solution. If removing a cell leaves the puzzle with two or more possible solutions, that removal is undone and another cell is tried. That is why you sometimes find “broken” sudokus online where two numbers end up interchangeable: nobody checked uniqueness. Ours always do.

Step 4: difficulty is measured

Here comes the interesting part: difficulty does not depend on how many cells are removed, but on which techniques are needed to solve it. The generator solves the puzzle the way a person would: if scanning and singles are enough, it is easy; if it needs naked pairs, it is medium; if it forces X-Wing or chains, it is hard or expert. Two sudokus with the same number of empty cells can have opposite difficulties.

Fun facts

Now that you know what happens behind the scenes, every cell you solve tastes a little better. Test yourself with our 30+ sudoku variants.

How a MundoSudoku puzzle is generated, the real steps

Here is exactly how our generator works, no secrets. First it fills a complete valid board: it walks the cells in order trying randomly shuffled numbers; when a cell runs out of options, it backtracks and changes the previous one (the famous backtracking). Within milliseconds there is a perfect 81-number board.

Then the carving starts: cells are picked at random and erased one by one. After each erasure the generator counts how many solutions the board has. Still exactly one? The gap stays. A second solution appears? The number goes back and another cell is tried. The process ends when the level's clue target is reached: 40 for easy, 32 for medium, 27 for hard and 23 for expert.

The special case of the daily sudoku

The daily sudoku has an elegant trick: instead of pure randomness, the generator is fed a seed derived from the date. With the same seed, the random process always produces the same result, so every player in the world gets exactly the same board without any server having to send it. The date 21-7-2026 becomes the number 20260721, that number boots the generator, and out comes the sudoku you, your neighbour and someone in Australia will all see.

Why 17 clues is the magic limit

For decades it was suspected that no 16-clue sudoku could have a unique solution, but nobody had proven it. In 2012 a team at University College Dublin settled it with the most elegant brute force possible: they enumerated the essentially different boards and verified by computer that no 16-clue sudoku is unique. It took about 7 million CPU hours. Our 23-clue expert boards are therefore surprisingly close to the theoretical limit.

Frequently asked questions

How many different sudokus exist?

There are 6,670,903,752,021,072,936,960 valid complete boards (about 6.67 sextillion). Discounting rotations, reflections and digit relabelling, 5,472,730,538 essentially different ones remain. They won't run out.

Is a sudoku with more gaps always harder?

Not necessarily. Real difficulty depends on which techniques the solve demands, not just the number of gaps. That's why two 27-clue boards can feel completely different: where the clues sit matters as much as how many there are.

Do MundoSudoku puzzles repeat?

The board space is so enormous that repetition is practically impossible. Only the daily sudoku is "repeatable" on purpose: the same date produces the same board for everyone.

Ready to play?
Put what you've learned into practice.
🎮 Play Sudoku free 🏫 See all games
Miguel Arechaga

Written by Miguel Arechaga

Creator and developer of MundoSudoku. Logic-puzzle enthusiast sharing guides and tips so you can enjoy and improve at every game.