Every sudoku has a path through it, and the path is always made of the same six moves. If you are stuck, you have not run out of logic; you have run out of the technique that applies to the position in front of you. This guide walks the moves in the order they become useful, so you can start at the top and work down until something gives.
The order matters. Trying to spot an X-Wing in a grid that still has naked singles is the most common way to waste ten minutes and conclude the puzzle is unsolvable.
Step 1: Naked single
A cell with exactly one candidate left. Look at a cell, cross out everything its row, column and box already contain, and if one digit survives, write it. At the start of an easy puzzle this is most of the solve. Later on it turns up constantly after other moves, so it is worth re-scanning the empty cells after every placement.
Step 2: Hidden single
A digit that has only one possible cell inside a unit. Instead of asking what a cell can hold, ask where a digit can go: take digit 4, look at one box, and if every other cell in that box already sees a 4 from its row or column, the remaining cell is a 4 even if it has several candidates in principle. Hidden singles are the reason sudoku looks easier than it is: they do not care how many other digits a cell could take.
Step 3: Write the candidates
When singles run dry, write small candidates in every cell with two or three possibilities. Skip cells with more than four; they are noise at this stage and hide the patterns. Do not pre-fill the entire board. Fill the tight cells, solve from them, erase affected marks as digits land.
Step 4: Naked and hidden pairs
Two cells in one unit holding exactly the same two candidates form a naked pair: those two digits cannot appear anywhere else in that unit, so cross them out. The hidden version is subtler: two digits that can only go in the same two cells of a unit. The cells may hold more candidates, but those two digits are locked to them, so every other candidate in those two cells can go.
Step 5: Locked candidates
Look at a box and one digit. If every place that digit can go inside the box lies on a single row, then that digit cannot go anywhere else on that row outside the box. The same works in reverse: if a digit in a row is confined to one box, remove it from the rest of that box. This is the first technique that spans two units and the one most often missed.
Step 6: X-Wing and beyond
Find a digit with exactly two possible cells in each of two rows, and those two cells sit in the same two columns. The digit must occupy opposite corners of that rectangle, which means neither column can hold it anywhere else. That is an X-Wing. The pattern is symmetric: rows can be swapped for columns. Swordfish is the same idea with three rows and three columns, and it is where most people stop needing anything harder.
A worked example
Take the grid on this page and run the six steps in order. The first pass with digits 1 to 9 finds a handful of hidden singles. The second pass, now that the board is a little tighter, produces naked singles. Then candidates go in, a naked pair appears in the middle box, and the rest of the grid resolves without a single guess. If your board stalls at step 4, the missing move is almost always a locked candidate.
Sudoku solver, step by step
How this solver works
Most sudoku solvers hand you the finished grid. This one shows the reasoning: it solves the puzzle with the same nine techniques a person uses, in order from easiest to hardest, and explains each step. You can step forwards and backwards through the whole solve and watch which cells each technique depends on.
If a puzzle cannot be cracked with these techniques, the solver says so instead of pretending - that is a genuinely hard puzzle, and it will show you the answer from an exact solver.
- Naked single - a cell with only one candidate left
- Hidden single - a digit that fits in only one cell of a row, column or box
- Locked candidates - a digit confined to one line inside a box, or one box inside a line
- Naked pair / triple - two or three cells sharing the same few candidates
- Hidden pair - two digits that fit in only the same two cells
- X-Wing - a digit with two positions in each of two lines
- XY-Wing - a pivot cell and two pincers eliminating a third digit
- Swordfish - the three-line version of X-Wing
Checking your work
When you are stuck or want to confirm a solve, enter the grid above into the solver. It shows each move with the technique that justifies it, which is a faster way to find the move you missed than staring at the same box for another five minutes. If the solver reports a contradiction, a digit was placed incorrectly earlier; there is no need to run the whole puzzle again from scratch.
Questions people ask
Do I ever have to guess?
Not on a well-formed puzzle. Every grid generated on this site has a logic-only solution. If you feel forced to guess, one of the six moves above is still available.
Which technique should I learn first?
Hidden singles. They are easy to describe, they appear in every difficulty level, and on easy puzzles they do more work than any other move. Locked candidates come second because they are the first technique that a beginner will not stumble into.
How do I know my candidates are right?
A candidate that survives the row, column and box test cannot be wrong; a candidate you forgot to erase can be. When a deduction feels impossible, check the marks before doubting the logic.
What difficulty needs which technique?
Easy is singles only. Medium needs pairs. Hard needs locked candidates and X-Wing. The difficulty guide has the full mapping, and each technique has its own page under sudoku strategies.
To practise a single technique in isolation, use the drills. To apply all six at once, print a hard puzzle.