Sudoku Solver Pro

How to solve sudoku

Start with four useful techniques: scanning, naked singles, hidden singles and box-line reduction. This page explains how to recognise each one and when the solver on our homepage can help. Some puzzles require more advanced deductions.

The rule everything rests on

A sudoku grid is nine rows, nine columns and nine 3×3 boxes. Every row, every column and every box must contain the digits 1 to 9 exactly once. That is the whole game: the puzzle is complete when all 27 units are valid.

Everything below is a consequence of that one rule. So before you use any technique, check that you have not already broken it — a single repeated digit in a row invalidates every deduction you built on top of it.

Technique 1 — scanning for that number in that box

Start with number 1, then 2, and so on. For each digit, look for boxes that do not have it yet and ask: which cells in this box could hold it?

This is called scanning. It is the fastest way into a fresh puzzle and frequently solves most of the grid before you need anything else. Do it with a finger or a pen: point at the box, sweep along the rows and columns, and name the digit out loud if it helps.

Technique 2 — the naked single

A cell with only one possible digit is a naked single. Count what is already visible in its row, its column and its box; if eight different digits are present, the ninth is the only thing that can go there.

Naked singles are easy to find in a mostly-filled grid and almost invisible in a nearly empty one. That is why order matters: scan first, then look for cells whose peers rule out eight different digits, then come back to singles.

A useful habit is to mark small candidate numbers in each empty cell and cross them out as digits appear in the row, column or box. When a cell has one candidate left, that is your next move — no guessing, no arrows to draw.

Real sudoku board: the empty cell at row 1, column 9 can only contain 3
Naked single example: row 1 is missing 2, 3 and 5. Column 9 already contains 2 and 5, so the top-right cell must be 3. These candidate deductions are explained here; the game does not display pencil marks.

Technique 3 — the hidden single

Here the cell has several candidates, but only one cell in the whole row, column or box can take a particular digit. The digit is hidden among the candidates, and it is the only place that digit can go.

The way to spot it: pick a unit (a row, a column, or a box), take one missing digit, and ask where it can go. If exactly one cell in that unit can hold it, write it in — even if that cell has three other candidates written in pencil.

Hidden singles are what break most medium puzzles open. They are worth practising more than any advanced technique, because they appear in nearly every grid you will ever touch.

Technique 4 — box-line reduction (pointing pairs)

Look at a box where a digit can only go in cells that all sit in the same row, or all sit in the same column. Then that digit must be in that row or column, inside that box — which means it cannot appear anywhere else in that row or column, outside the box.

Cross those candidates out. Often that leaves a hidden single somewhere else, and the puzzle moves again. This is the first "advanced" technique that pays for itself, and it is enough for many hard puzzles.

A working order

  1. Scan for every digit you can place by elimination, starting with the ones that appear most often in the givens.
  2. Look for naked singles — cells whose peers rule out eight different digits.
  3. Look for hidden singles in rows, columns and boxes you have not checked recently.
  4. Only then start crossing out candidates with box-line reduction.
  5. After every placement, go back to step 2. One digit placed can create two more singles.

When nothing works, you have two honest options. Put the puzzle down and come back with fresh eyes — a break finds singles that staring does not. Or mark your candidates properly and look again at the units you checked first; a mistake made early is usually the reason a grid looks stuck.

When the grid looks impossible

If the grid seems to have no solution, the puzzle was almost certainly entered incorrectly. This is the most common reason a sudoku looks impossible: two digits swapped in one row, or a given placed a cell to the left.

That is the one place where a sudoku solver is genuinely better than a pencil. Press Enter your own puzzle on our board and type the givens in: as you type, any digit you repeat in a row, a column or a box turns red at once, so the typo shows up while you enter it rather than after you have built deductions on top of it. When the grid is complete, press Solve — if the digits form no valid sudoku it says so, and if there is exactly one answer it fills in the empty cells and marks which digits it added, so your own work stays visible.

And if you are halfway through and only want a nudge rather than the whole answer, press Hint instead. It adds one correct digit per press. That keeps the solving yours.

A note on guessing

Guessing is not a technique. If you guess, write the guess down somewhere, because you will need to undo it. Every puzzle generated on this site is checked to have exactly one solution. That does not guarantee that these four techniques are enough: harder puzzles can require advanced deductions or a systematic search.

Where to go next