Account

What new tool do you want?

Fun & Games

Sudoku Solver

Solve any Sudoku instantly — paste or type the grid (dots or zeros for blanks) and get the completed solution, or learn that it has none or many.

How to use

  1. 1Type the puzzle row by row — 81 digits, using 0 or . for blanks. Spaces, bars and line breaks are ignored.
  2. 2The solved grid appears instantly.

How it's calculated

A backtracking search that always fills the cell with the fewest candidates first — it solves even the hardest valid puzzles in milliseconds.

Frequently asked questions

What if my puzzle has more than one solution?

You'll be told it has multiple solutions, and one of them is shown. A proper Sudoku has exactly one.

Why does it say the puzzle is invalid?

A digit repeats in a row, column or box — check for a typo in what you entered.

Can I enter it as one line?

Yes — 81 characters on one line work, as do 9 lines of 9.

What input format it accepts

The solver strips out everything except digits and dots before checking anything, so spaces, pipe characters, grid lines and line breaks are all ignored automatically — you can paste a puzzle as 9 lines of 9 characters (matching how it looks on paper) or as one unbroken 81-character string, and both work identically. Blank cells can be entered as either 0 or a period; if the cleaned input isn't exactly 81 characters, it tells you how many it actually found so you can spot a missing or extra digit.

Why it solves instantly: fewest-candidates-first

Rather than scanning cells left-to-right, the backtracking search always picks whichever empty cell currently has the fewest legal candidates (checking each cell's row, column and 3×3 box constraints) and tries those first. This 'most constrained cell' strategy prunes dead-end branches far earlier than a naive top-left-to-bottom-right search would, which is why even very sparse, hard-rated puzzles typically solve in well under a second.

Worked example: a classic 30-clue newspaper puzzle

A 30-clue grid starting '530070000600195000098000060800060003400803001700020006060000280000419005000080079' solves to a complete grid beginning '5 3 4 | 6 7 8 | 9 1 2' and so on through all nine rows, with the tool reporting 'Unique solution' and '30' clues given. The solved grid is shown in the same row/column/box layout as the input, with dividing lines every three rows and columns to make it easy to check by eye against a printed puzzle.

Catching invalid and ambiguous puzzles

Two failure modes are detected before any solving happens: if a digit already repeats in some row, column or box, the solver reports there's no solution at all (the usual cause is a typo when transcribing the puzzle). If a valid grid has more than one possible completion — which shouldn't happen with a properly constructed Sudoku — it's flagged as 'Multiple solutions — one shown' rather than silently picking one and claiming it's the answer.

The sample puzzle is already in the box, dots and all

The box starts empty. The grey hint is a full 81-cell puzzle, dots included, but nothing is solved until I paste or type. I need exactly 81 cells. A shorter paste tells me how many cells it counted. A grid that cannot be solved says there is no solution and tells me to look for a repeated digit or a typo. If more than one finished grid fits, the status says multiple solutions and still shows one of them, with the clue count beside it. The output updates as I edit, a clear control empties the box, and I can download the solved grid as a plain text file.

Related tools

More: Fun & Games