Everyday & games

Sudoku solver and checker

Check a Sudoku’s givens, solve it, say whether the solution is unique, rate how hard it is and give a hint without spoiling it.

Sudoku solver and checker
Esc to restore

Your inputs

81 characters, or nine lines of nine: digits 1 to 9, and . 0 _ or - for blanks. Spaces, | and +---+ lines are ignored.

Results update as you type. Larger files run when you press Update result.

Your result

Your result will appear here.

More actions

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Checks the givens first and names any digit repeated in a row, column or 3 × 3 box. It then fills cells by logic alone: a naked single (a cell with one candidate left) or a hidden single (the only place for a digit in a row, column or box), repeated until none is left; the count of cells found this way is reported. To finish and to prove uniqueness it runs a depth-first search with constraint propagation (both kinds of single after every placement) that always branches on the cell with the fewest candidates, and keeps searching after the first solution until it finds a second or exhausts the tree, so “unique”, “more than one solution” and “no solution” are certain. The number of trial placements before the first solution gives a difficulty label, which is a heuristic and not a human grading. Hint mode shows only the next single and why it holds. The search stops after 200,000 positions. Only standard 9 × 9 Sudoku is supported (no killer, X or jigsaw variants), and it does not name advanced techniques such as pairs, X-wings or chains.

How this is checked

5 reference checks passed These 5 cases were run when this page was built, on 20 October 2026, and all reproduce within the stated tolerance. The same cases are part of the automated tests that run on every change to Toolmoz. Engine version 1.

See the checks and where each expected answer comes from
  1. Case 1

    Inputs
    The tool’s default inputs
    Expected, and what Toolmoz gave
    Status expected Unique solution, Toolmoz Unique solutionSolution expected 534678912672195348198342567859761423426853791713924856961537284287419635345286179, Toolmoz 534678912672195348198342567859761423426853791713924856961537284287419635345286179
    Where the expected answer comes from
    The example puzzle and solution shown in Wikipedia’s Sudoku article, confirmed unique by Knuth’s Algorithm X in a separate Python script
    Allowed difference
    exact
  2. Case 2

    Inputs
    Puzzle 4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......
    Expected, and what Toolmoz gave
    Status expected Unique solution, Toolmoz Unique solutionSolution expected 417369825632158947958724316825437169791586432346912758289643571573291684164875293, Toolmoz 417369825632158947958724316825437169791586432346912758289643571573291684164875293
    Where the expected answer comes from
    Puzzle grid2 (the first hard puzzle) from Peter Norvig’s essay; solution and uniqueness from Knuth’s Algorithm X in a separate Python script, every row, column and box checked
    Allowed difference
    exact
  3. Case 3

    Inputs
    Puzzle 55..7....6..195....98....6.8...6...34..8.3..17...2...6.6....28....419..5....8..79
    Expected, and what Toolmoz gave
    Status expected Invalid: conflicting givens, Toolmoz Invalid: conflicting givens
    Where the expected answer comes from
    Two 5s given in row 1 break the row rule
    Allowed difference
    exact
  4. Case 4

    Inputs
    Puzzle 53467891267219534819834256785976.42.42685.79.713924856961537284287419635345286179
    Expected, and what Toolmoz gave
    Status expected More than one solution, Toolmoz More than one solution
    Where the expected answer comes from
    The Wikipedia solution with rows 4 and 5, columns 6 and 9 blanked: the digits 1 and 3 form a rectangle across two boxes and can be swapped, so exactly two completions exist (Python Algorithm X)
    Allowed difference
    exact
  5. Case 5

    Inputs
    Show hint
    Expected, and what Toolmoz gave
    Cell expected Row 5, column 5, Toolmoz Row 5, column 5Digit expected 5, Toolmoz 5Technique expected naked single, Toolmoz naked single
    Where the expected answer comes from
    By hand: in the Wikipedia puzzle the centre cell sees 8, 3, 1 and 4 in its row, 7, 6, 2, 1 and 8 in its column and 6, 8, 3 and 2 in its box, leaving only 5; it is the first naked single in reading order (checked with a separate Python script)
    Allowed difference
    exact

What this shows: the engine reproduces independently worked values for these cases. It does not prove every possible input is right. To test an answer you were given, see how to check a number; to see what is and is not checked across Toolmoz, see the accuracy ledger.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Puzzle
53..7....
6..195...
.98....6.
8...6...3
4..8.3..1
7...2...6
.6....28.
...419..5
....8..79
Show
The full solution

Example result

Status
Unique solution
Givens
30
Solution
534678912672195348198342567859761423426853791713924856961537284287419635345286179
Cells found by singles alone
51
Trial placements (guesses)
0
Difficulty (heuristic)
Singles only (easy to moderate)
Search positions
1

Solved by constraint propagation (naked and hidden singles) and depth-first search that always branches on the cell with the fewest candidates; the search continues after the first solution to check whether a second exists. The difficulty label is a heuristic from the number of trial placements, not a human grading.