Sudoku Solver
Load a puzzle or type in your own — then hit Solve!
Load a Sample Puzzle
Click a cell · type 1–9 · arrow keys to navigate
About Sudoku
Sudoku (数独, "single number") is a logic-based number-placement puzzle. Although it originated in the United States as "Number Place" (1979, Dell Magazines), it was popularised in Japan by Nikoli in 1984 under the name Sudoku. It exploded globally in 2004–05 when New Zealand judge Wayne Gould wrote a computer program to generate puzzles and convinced The Times of London to publish them. Today, billions of sudoku puzzles are solved every year across print, apps, and websites worldwide.
The Rules of Sudoku
Rows
Each of the 9 horizontal rows must contain the digits 1–9 with no repetition.
Columns
Each of the 9 vertical columns must contain 1–9 with no repetition.
3×3 Boxes
Each of the nine 3×3 sub-grids (boxes) must contain 1–9 with no repetition.
How to Use Our Sudoku Solver
- Load a sample puzzle (Easy / Medium / Hard) or manually click cells and type numbers 1–9.
- Use the number pad below the board or your keyboard to fill cells.
- Navigate with arrow keys between cells for fast entry.
- Red highlighting alerts you to conflicts (duplicate numbers) before you solve.
- Click "Solve Puzzle" and watch the board fill in — green cells show the computed answers.
How the Solver Works
Our solver implements a backtracking algorithm combined with constraint propagation. It works by: (1) finding an empty cell, (2) trying each digit 1–9, (3) checking if the digit is valid (no conflict in row, column, or box), (4) recursively attempting to solve the rest of the puzzle, and (5) backtracking if no valid digit leads to a solution. This brute-force-with-pruning approach solves even "world's hardest" sudoku puzzles in under a second.
Manual Solving Strategies
- Naked Singles: A cell with only one possible digit — fill it immediately. Start here.
- Hidden Singles: A digit that can only go in one cell within a row, column, or box.
- Naked Pairs: Two cells in a unit that can only contain the same two digits — eliminate those digits elsewhere in the unit.
- Scanning: For each digit 1–9, scan rows and columns to eliminate candidates and find forced placements.
- Start dense. Begin solving in rows, columns, or boxes with the most given numbers — they constrain the most.
Frequently Asked Questions
❓ What is the minimum number of given clues needed for a unique Sudoku solution?
In 2012, mathematicians proved the minimum is 17 clues. Any puzzle with 16 or fewer given numbers has multiple solutions.
❓ Was Sudoku really invented in Japan?
No — it was invented by Howard Garns in the US in 1979, though he never received credit during his lifetime. Japan popularised and renamed it. Garns died in 1989, before the global Sudoku craze began.
❓ How many valid completed Sudoku grids exist?
There are exactly 6,670,903,752,021,072,936,960 valid completed Sudoku grids — roughly 6.67 × 10²¹. When accounting for symmetry, this reduces to about 5.47 billion essentially different grids.