Sudoku Solver
Enter the digits you have, then solve the whole grid or go one logical step at a time.
How to use the Sudoku Solver
- Open the Solve tab.
- Enter the clues by clicking a cell and typing its digit. Use the arrow keys to move between cells, and press Backspace to remove a digit.
- Or paste the whole puzzle as text into the Paste a puzzle box and press Load pasted puzzle.
- Look for red digits. Before solving, any digit that repeats in a row, column or box is marked in red. Fix these first, because the puzzle cannot be solved as entered.
- Read the rating. The solver labels the puzzle easy, medium, hard or expert, and shows the hardest technique needed and the number of logical steps.
- Press Check uniqueness to see whether the puzzle has no solution, exactly one, or more than one.
- Press Next step to place one digit or remove some candidates at a time. Each step names the technique and says which row, column or box it uses.
- Press Solve to fill the whole grid. Digits the solver adds are shown in colour, so you can tell them apart from your clues.
- Press Show candidates (possible digits) to see which digits are still possible in each empty cell.
- Press Clear to empty the grid and start a new puzzle.
On a 9x9 grid you can also choose Diagonal sudoku or Hyper sudoku. Killer, samurai and jigsaw puzzles cannot be entered on this page.
What is a sudoku solver and how does it work?
A sudoku solver applies the rules of sudoku to find digits that must go in each empty cell. Every row, column and box must contain each digit from 1 to 9 exactly once on a 9x9 grid, with the same rule for the other sizes.
The tool has two engines. Next step uses human logic only: it looks for a cell or digit that is forced by the clues and the rules, places it or removes candidates, and never guesses. Solve uses an exact search that tries the remaining possibilities in a fixed order and proves the result, so it also finishes puzzles that logic alone cannot. If that search becomes too long, for example on a grid with very few clues, it stops and says it gave up rather than offering an answer it cannot prove.
What is a naked single in sudoku?
A naked single is a cell that has only one possible digit left. The solver works out the candidates for each empty cell by removing digits already present in its row, column and box. When one candidate is left, that digit must go in the cell. This is the easiest technique and is usually the first one the solver uses.
What is a hidden single in sudoku?
A hidden single is a digit that can go in only one cell within a row, column or box. The cell itself may still have several candidates, but no other cell in that unit can take the digit. Hidden singles are often what unlocks a puzzle after naked singles run out.
What are locked candidates, naked pairs and X-Wing?
These are harder techniques for puzzles that stop yielding to singles. Locked candidates (pointing and claiming) use the fact that a digit in one box is confined to one row or column, or the reverse, which lets you remove it from the rest of that line. A naked pair is two cells in a unit that share the same two candidates, so those digits can be removed from other cells in the unit. X-Wing and Y-Wing look for patterns across several rows, columns or cells to remove candidates. The solver names the technique it uses at each step, so you can learn these patterns over time.
Can a sudoku solver solve the hardest sudoku?
Yes, the solver’s exact method can handle very hard puzzles. It solves well-known very difficult 9x9 puzzles, such as AI Escargot, in a few milliseconds on a laptop. Puzzles that need advanced techniques are rated hard or expert, and the rating tells you which technique is the hardest one needed.
Is this a step by step sudoku solver?
Yes. When you press Next step, the solver shows the name of the technique and a sentence explaining why the move works. The Example puzzle from the Wikipedia Sudoku article has exactly one solution and is solved with 51 naked singles, so the solver rates it easy.
Frequently asked questions
How do I enter a sudoku into the solver?
Type the digits into the grid, or paste the puzzle as text with one character per cell. Use a dot or 0 for each empty cell, and letters A to G for the numbers 10 to 16 on larger grids. Spaces and line breaks are ignored, so you can paste rows as they appear in a book.
What if my sudoku has more than one solution?
Press Check uniqueness and the solver will tell you that the puzzle has more than one solution. This usually means a clue is missing or was copied wrongly. Check your puzzle against the original, add any missing clue, and run the check again.
Can it solve 16x16 or 6x6 sudoku?
Yes. The solver handles 4x4, 6x6, 9x9, 12x12 and 16x16 grids. On 16x16 grids, use the letters A to G for the digits 10 to 16 when you paste a puzzle.
Why does the solver say it gave up?
This happens when the search takes too long, which is most likely with a grid that has very few clues. Add a clue or two from the original puzzle, if you have one, and try again.
Why are some digits shown in red?
Red marks a digit that repeats in the same row, column or box. Because the puzzle breaks the rules, it cannot be solved until you fix the repeated digit.
Is my puzzle sent to a server?
No. Everything runs in your web browser, and nothing is uploaded. The puzzle is solved on your own device.
Can I use the solver for killer or jigsaw sudoku?
No. Killer, samurai and jigsaw puzzles cannot be entered here. The solver works with standard grids and the 9x9 Diagonal and Hyper variants.
Related tools
- How to play sudoku: read this if you want to learn the rules and basic strategy before you use the solver.
- Printable sudoku: use this when you want a puzzle on paper to solve by hand.
- Sudoku generator: use this to create a new puzzle to practise on.
- Hard sudoku: use this when you want puzzles that need advanced techniques.
- Diagonal sudoku: use this for the Sudoku X variant, where both diagonals also contain each digit once.
- 16x16 sudoku: use this for the larger grid with digits and letters up to G.
- Killer sudoku: use this for puzzles that add cage sums to the standard rules.
- Daily sudoku: use this for a new puzzle to try each day.