Sudoku Solver & Generator

Generate new Sudoku puzzles at several difficulties or solve any puzzle instantly, with an explanation of how the solving actually works.

Seventeen clues is the floor, and every one is load-bearing

A sudoku is only a puzzle if it has exactly one solution. Too few clues and several grids fit — it is still fillable, but "the answer" stops meaning anything.

The minimum is 17. That was settled in 2012 by an exhaustive computer search which found no valid 16-clue puzzle anywhere, while 17-clue puzzles are known in the thousands. Here is one, with 17 givens:

· · · · · · · 1 · 4 · · · · · · · · · 2 · · · · · · · · · · · 5 · 4 · 7 · · 8 · · · 3 · · · · 1 · 9 · · · · 3 · · 4 · · 2 · · · 5 · 1 · · · · · · · · 8 · 6 · · ·

What is worth demonstrating rather than repeating is how tight that is. Deleting each clue in turn, one at a time, and counting the solutions of what remains:

GridSolutions
All 17 cluesexactly 1
Any single clue removedmore than one — in all 17 cases

Not most cases. All 17, with 0 exceptions. There is no spare information anywhere in that grid — every digit is doing work no other digit can do. That is a considerably stronger statement than "17 is the minimum", and unlike the minimum it is checkable on a single puzzle rather than by searching the whole space, which is what the solver above does when it reports how many solutions your grid has.

Which is why the clue count is a poor difficulty rating

Newspapers print a difficulty next to a puzzle, and it is tempting to read the number of givens as the measure of it. It is not. A 17-clue puzzle can be perfectly approachable if the clues are well placed, and a 30-clue puzzle can demand long chains of reasoning if they are not.

Adding a correct clue can never make a puzzle ambiguous — we check that too — so more givens never costs you uniqueness. What decides difficulty is which solving techniques the path requires: whether it falls to scanning alone, or needs pairs, or needs something you would have to look up.

The clue count does bound exactly one thing, and bounds it absolutely: below seventeen there is no puzzle at all, only a grid with several answers. If a solver ever tells you a published puzzle has more than one solution, the puzzle is wrong rather than hard — which is worth checking before assuming you have made a mistake somewhere.

How to use

  1. Enter a puzzle, or generate a new one.
  2. Solve it instantly, or ask for a single hint.
  3. Check that your own puzzle has a unique solution.
  4. Use hints sparingly if you are learning.

Frequently asked questions

How does a computer solve Sudoku?

Usually by constraint propagation followed by backtracking search — filling in every cell that has only one possibility, and when that stalls, guessing a value and exploring, undoing the guess if it leads to a contradiction. It is fast because propagation eliminates most of the search.

Can it tell me if my puzzle is broken?

Yes, and this is one of its more useful functions. A puzzle can have no solution, which means a mistake somewhere, or several solutions, which means it is not a proper Sudoku. Both are worth knowing before spending an hour on it.

What makes a puzzle hard for a human but easy for a computer?

Techniques that require holding many candidates in mind at once. A computer applies constraint propagation uniformly and does not find chains of conditional logic any harder than simple scanning, whereas for a person the difference is enormous.

Should I use hints while learning?

Sparingly, and preferably as a nudge rather than an answer. Being shown which cell is solvable next teaches you what to look for; being given the digit teaches nothing. The learning is in noticing the pattern, not in filling the square.

Are all difficulty ratings comparable?

No. Ratings come from which solving techniques a puzzle requires, and different generators use different scales. An easy from one source can be harder than a medium from another, so ratings are only meaningful within a single source.

Does the solver ever guess?

It may, on puzzles that need it, but the puzzles generated here never do — every one is checked to be solvable by logic alone with exactly one solution. A puzzle requiring a guess is generally considered defective rather than difficult.

🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.