Saved

Press the star next to a tool's name to save it.

All my tools

Sudoku Solver

Use this sudoku solver to enter the numbers of a sudoku puzzle and fill in the rest of the grid, with a check for mistakes and for puzzles with no or many solutions.

Click a square, then press a number or use the keypad. Enter the numbers given in your puzzle and press Solve. Squares that break a rule are shown in red. You can also paste a puzzle as 81 characters.

Your puzzle is solved in your browser. Nothing is uploaded.

Solution

Enter your puzzle and press Solve.

A sudoku solver fills in a sudoku puzzle for you. Enter the numbers that are given in your puzzle, press Solve, and the solver fills in the rest of the grid. It also checks your puzzle: it flags numbers that break the rules, tells you if the puzzle has no solution, and tells you if it has more than one. Everything runs in your browser, so your puzzle is never sent anywhere.

The rules of sudoku

Wikipedia's Sudoku article explains that in classic sudoku the objective is to fill a 9×9 grid with digits so that each column, each row and each of the nine 3×3 boxes that make up the grid contains all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which, for a well-posed puzzle, has a single solution. The solver applies exactly these rules.

How to use the sudoku solver

  1. Click a square and press a number from 1 to 9, or use the keypad. Arrow keys move around the grid.
  2. Enter every number given in your puzzle. Or paste the puzzle as 81 characters.
  3. Press Solve. The filled-in numbers appear in the empty squares.
  4. Press Clear to start a new puzzle.

Worked example

Take a standard puzzle that begins 5, 3, empty, empty, 7 in its first row and has 30 numbers given in all. Enter them, press Solve, and the first row becomes 5 3 4 6 7 8 9 1 2. The solver reports that the puzzle has exactly one solution, which is what a well-posed puzzle should have. Your own numbers are shown in bold and the solver's numbers in plain type, so you can see what it added.

When the numbers break a rule

If a number repeats in a row, a column or a box, the repeated numbers are shown in red, and the solver tells you to fix them before it solves. This is the quickest way to find a typing error when you copy a puzzle from a book or a newspaper. Check the red squares against the printed puzzle.

No solution, or more than one

If the numbers do not break a rule but no way of completing the grid works, the solver reports that the puzzle has no solution, which usually means that a number has been copied wrongly. If the puzzle has several solutions, the solver fills in one of them and says so. The Mathematics of sudoku article explains that ordinary sudokus, called proper puzzles, have a unique solution, and that a 2014 paper proved that the minimum number of clues in any proper sudoku is 17. A grid with fewer than 17 numbers always has more than one solution.

How the solver works

The solver uses backtracking. It looks for the empty square with the fewest numbers that could go in it, tries each possible number in turn, and carries on, going back when it reaches a dead end. The Sudoku article says that algorithms such as brute force with backtracking can solve most 9×9 puzzles efficiently, and the solver finishes in a fraction of a second for ordinary puzzles. It does not explain its steps, as a human would, so it is best for checking your answer or getting past a stuck puzzle.

Using it to learn

If you are stuck, enter your puzzle and solve it to see which number belongs in the square that is holding you up, then carry on on paper. Checking your finished puzzle is also easy: enter your answers as if they were given, and the solver tells you if any number breaks a rule. For playing a puzzle on screen, with notes and hints, try the sudoku online game.

Privacy

The puzzle is solved in your browser, so nothing is sent to a server and no account is needed. Close the page or press Clear to remove the puzzle.

Entering a puzzle from a book

Work through the puzzle in rows, using the arrow keys to move and the number keys to enter each given number. After each number the cursor moves to the next square, so you can type along a row, using the arrow keys to skip an empty square. Once every given number is in, compare the grid with the book before you press Solve, since a single wrong number can make the puzzle unsolvable.

Pasting a puzzle

Many websites and apps show a puzzle as a line of 81 characters, with a 0 or a dot for each empty square. Paste that line into the box and press Load pasted puzzle, and the grid fills in. Spaces and line breaks in the pasted text are ignored, so you can paste a grid copied as nine lines of nine characters.

Common mistakes

  • Mistyping a number. Red squares show a repeat.
  • Entering the solution squares too. Enter only the given numbers.
  • Expecting steps. The solver gives the answer, not the reasoning.
  • Using too few numbers. Fewer than 17 always allows several solutions.

What next

Use this often? Add Sudoku Solve to your Home screen.

Frequently asked questions

How does a sudoku solver work?

It tries numbers in the empty squares and backtracks when a number leads to a dead end, until the grid is complete.

Can the solver check a puzzle I filled in?

Yes. Enter your answers as given numbers, and it flags any that break a rule.

What if my puzzle has no solution?

The solver tells you, which usually means a number was entered wrongly.

What if there is more than one solution?

The solver fills in one and says that others exist.

Is my puzzle uploaded?

No. It is solved in your browser.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Fun & Lifestyle Tools