Sudoku solver
Solved in your browser · nothing is uploaded
Solves any sudoku and tells you whether the puzzle is properly set. A published sudoku has exactly one solution by definition, so finding two means a clue has been mistyped.
How to use the sudoku solver
The solver is a backtracking search that always fills the most constrained cell first — the empty cell with the fewest legal digits. That single heuristic is the difference between instant and unusable: going left to right instead can take seconds on a hard grid, while choosing the tightest cell first solves a minimal 17-clue puzzle in well under a millisecond, because each choice eliminates most of the remaining tree.
The uniqueness check is the more useful output. A sudoku is defined as having exactly one solution, and it is a property of the puzzle rather than of the solver. If two solutions exist, the grid as typed is not a valid sudoku — in practice that almost always means a digit was misread from the newspaper. The search stops after finding a second solution, which is enough to answer the question without enumerating what can be millions of solutions for a nearly-empty grid.
Seventeen is the proven minimum number of clues for a unique solution. That was an open question for decades and was settled in 2012 by exhaustive computer search — there is no 16-clue sudoku with a single solution, and there never will be.
The grid is made of real input fields rather than drawn on a canvas, so it works with a keyboard and with a screen reader. A canvas grid looks tidier and is unusable for both.
Questions
The grid as typed is not a valid sudoku. A published puzzle has exactly one solution, so a clue has almost certainly been mistyped.
Seventeen. That was proved by exhaustive computer search in 2012 — no 16-clue puzzle has a unique solution.
It always fills the most constrained cell first. Solving left to right on the same grid can take seconds.
Type it into the grid. Blanks can be left empty; the solver accepts dots and zeros when reading pasted text.
No. Everything happens in your browser — you can load the page, go offline, and it still works.