Sudoku solver

Enter the given digits in the grid, or paste the puzzle as 81 characters. The solver fills in the rest as you type, highlights the digits it found, marks any givens that clash and tells you whether the puzzle has exactly one solution.

81 characters row by row: digits for givens, 0 or . for empty cells. Spaces and line breaks are ignored.

Solved. The puzzle has exactly one solution.

Solution

30 digits given, 51 filled in (shown in colour).

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Click a cell and type a digit; arrow keys move between cells. Or paste the puzzle into the text box.
  2. Watch the solution appear on the right. Digits the solver found are shown in colour.
  3. If a cell is marked, its digit clashes with another given.

How it works

Each row, column and box keeps a record of the digits it already holds. The solver looks for the empty cell with the fewest candidates, places each candidate in turn and recurses; when a cell has no candidates left it steps back. It stops after two solutions, which is enough to tell a unique puzzle from one with several answers.

Worked example

The example puzzle starts with 30 givens; its first row is 5 3 _ _ 7 _ _ _ _. The solver completes it to 5 3 4 6 7 8 9 1 2 and fills in the other 51 cells — the only solution.

Tips

  • To check your own answer, enter the puzzle and compare digit by digit.
  • For a new puzzle to solve on paper, use the sudoku generator.

Frequently asked questions

How does the sudoku solver work?

By backtracking: it picks the empty cell with the fewest possible digits, tries each in turn, and undoes the choice when it leads to a dead end. Choosing the most constrained cell first keeps the search small, so even hard puzzles are solved in a fraction of a second.

How does it know whether the solution is unique?

It keeps searching after the first solution. If it finds a second one, the puzzle is not unique and the tool says so; a proper sudoku has exactly one solution.

Why does it say the puzzle has no solution?

Either two givens clash in the same row, column or 3×3 box (those cells are marked), or the givens are consistent on their own but leave some cell with no possible digit. Check for a typing mistake.

Can I paste a puzzle from somewhere else?

Yes. Paste 81 characters into the text box, row by row, with 0 or a dot for empty cells, like 53..7....6..195…. Line breaks, spaces and the | and + of drawn grids are ignored.

More in Education

All tools in this category: Education ·Updated November 4, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.