Sudoku Solver — Step by Step, With the Reason for Every Move

Enter your puzzle and press Next step. The solver finds the easiest logical move, marks the cells and tells you why it works — so you learn the technique instead of copying the answer.

Empty grid
Typing:

Tap a cell, then a number — or type on the keyboard. Paste 81 characters: digits for givens, 0 or . for empty cells.

Next move

Press Next step to see the easiest move and why it works.

Solve all uses only logic. If logic runs out, it says so and finishes by trial and error, marking those cells. No ads, no sign-up.

Want a fresh puzzle?Daily sudoku, 5 levels, notes and hints.
Play Sudoku

How to use the solver

Click a cell and type its digit, or tap a cell and use the number pad on a phone. You can also paste the whole puzzle as 81 characters, row by row: digits for the givens, 0 or a dot for empty cells. The solver checks the grid as you type and tells you whether it has one solution, none or more than one.

Press Next step. The solver looks for the easiest move available — a single first, a pair or an X-Wing only when nothing simpler works — so the order is close to how a person solves. The cells of the pattern turn violet, candidates the step removes are crossed out in red, and the text names the technique and the cells: R4C7 means row 4, column 7. Apply the step to make it, or Undo to go back. Copy link gives an address that opens the same position — handy for asking a friend or a forum.

Techniques it explains

Naked single
Only one candidate is left in a cell: the other digits are already in its row, column or box, or earlier steps have ruled them out.
Hidden single
A digit has only one possible cell in a row, column or box, even if that cell still has other candidates.
Pointing and box–line
Inside a box, a digit is locked to one row or column, so the rest of that line cannot hold it. The reverse works too: in a row or column, a digit locked to one box leaves the rest of that box.
Pairs and triples
Two cells of a unit hold only the same two candidates (a naked pair): those digits are spoken for, so the other cells of the unit lose them. Or two digits fit only the same two cells of a unit (a hidden pair): those cells must hold them, so their other candidates go. Triples work the same way with three.
X-Wing
In two rows a digit fits only the same two columns. It must sit on opposite corners of that rectangle, so the rest of both columns loses it. The same works with rows and columns swapped.
Swordfish
An X-Wing with three rows and three columns.
XY-Wing
A cell with candidates x and y sees a cell with x and z and another with y and z. Whatever the first cell is, one of the other two becomes z, so a cell that sees both of them cannot be z.

When it says “needs trial and error”

These techniques solve almost every newspaper and app puzzle, including most of those marked Expert. A few very hard grids need more. When no technique applies, the solver says so instead of pretending: it picks the empty cell with the fewest candidates, fills in the digit from the puzzle’s only solution and marks the cell as a guess. Solve all works the same way — logic first, trial and error only where logic runs out — so you can see exactly where the hard part is.

Mistakes and puzzles with more than one solution

A digit that appears twice in a row, column or box turns red at once. Check for mistakes goes further: type the givens, switch Typing to My digits and enter your own progress, and it marks every digit that disagrees with the puzzle’s solution. If a grid has no solution, it looks for the one digit whose removal fixes it. A proper sudoku has exactly one solution and at least 17 givens. If yours has more than one, the solver warns you before you start: it still makes the logical moves it can find, but it never guesses on such a grid.

Questions

Is the sudoku solver free?

Yes. It runs in your browser on a computer or a phone, with no sign-up and no ads; the solving happens on your device.

Does it just show the answer?

No. It shows one move at a time and explains why the move works, so you can learn the technique. Solve all is there when you want the whole solution.

How many givens does a sudoku need?

At least 17. In 2012 a computer search by Gary McGuire and colleagues showed that no sudoku with 16 givens has a single solution.

Can I share a puzzle?

Yes. Copy link gives an address with the grid in it; anyone who opens it sees the same position.

Want to practise these techniques on fresh grids? Play Sudoku — five levels, notes and hints — or print a sheet from the free puzzle resources.