Sudoku solver with steps

Enter a puzzle and see it solved one logical step at a time, each step named and explained.

Advertisement

Enter a puzzle

Select a cell and type a digit, or use the pad. Arrow keys move; Backspace clears.

Puzzle to solve

    Advertisement

    A solver that teaches

    Most sudoku solvers show you the finished grid. This one shows you how to get there. It works like a careful human solver: at every step it looks for the simplest technique that makes progress, applies it, and writes down what it did, such as “Hidden single: 4 can only go in r3c5 in box 2” or “X-Wing on 7 in rows 2 and 6: removes 7 from r4c3, r8c3”. Press Next to watch each step happen on the board, with the cells involved highlighted, and Previous to go back.

    Cells are named by row and column: r3c5 means row 3 (counting from the top), column 5 (counting from the left). Boxes are numbered 1 to 9 from the top-left, left to right. Technique names link to our strategy guides where one exists.

    How to enter a puzzle

    Before solving, the grid is checked. If the same digit appears twice in a row, column or box, those cells are marked so you can fix the typo. If the puzzle has no solution, or more than one, the solver says so instead of pretending. A valid sudoku needs at least 17 givens: McGuire, Tugemann and Civario proved in 2012 that no 16-clue puzzle has a unique solution, so a grid with fewer than 17 givens is flagged as well.

    Which techniques it uses

    The solver knows the same fifteen techniques our grader uses for the daily puzzles, in order of difficulty: hidden and naked singles; pointing pairs, box/line reduction, naked and hidden pairs; naked and hidden triples, X-Wing and XY-Wing; Swordfish, XYZ-Wing, simple coloring, unique rectangles (type 1) and Jellyfish. Every puzzle on this site can be solved with these. Some very hard puzzles from elsewhere need more advanced ideas such as chains. In that case the solver explains as many logical steps as it can and then finishes with backtracking, a systematic search that tries a digit and backs up when it reaches a contradiction. That final step is clearly labelled “found by trial and error” so you know it is not a logical deduction.

    Using the steps to learn

    If you are stuck on a puzzle from a book or newspaper, enter it, press Solve and step forward only until the solver does something you had not spotted. That is the technique to learn next. Reading the explanation alongside the highlighted cells is often enough to recognise the pattern next time. For practice, each strategy guide links to puzzles that cannot be solved without that technique.

    Everything runs in your browser. Your puzzle is not uploaded or stored, and solving normally takes a fraction of a second; if a grid takes longer than three seconds, the solver stops and asks you to check for typos.

    Frequently asked questions

    Can I solve a puzzle from a newspaper here?

    Yes. Type the givens into the grid, or paste them as 81 characters (digits 1-9, and 0 or . for empty cells), then press Solve.

    Why does it say the puzzle has more than one solution?

    A proper sudoku has exactly one solution. If a digit was mistyped or left out, the puzzle may allow several; check the givens against the original.

    What is the minimum number of clues?

    Seventeen. In 2012 McGuire, Tugemann and Civario showed by an exhaustive computer search that no sudoku with 16 clues has a unique solution.

    What does “found by trial and error” mean?

    Some puzzles need techniques beyond our list, such as chains. The solver then finishes with backtracking, which is guessing and checking, and labels those cells clearly.

    Is my puzzle sent anywhere?

    No. Solving happens in your browser; the grid is not sent to a server.

    Why did it stop after three seconds?

    Valid sudokus solve in a fraction of a second. If a grid takes longer than three seconds the solver stops, which usually means a typo has made the puzzle unsolvable or very open.

    Updated · Written by the NineByNine team