Sudoku Solver
Enter any valid 9×9 Sudoku puzzle and get the solution instantly. Click a cell, type a digit. Leave blanks for empty cells. Hit Solve.
Enter Your Puzzle
How to Use
- Click a cell and type 1–9 to enter a clue digit.
- Backspace or Delete to clear a cell.
- Arrow keys to move between cells.
- Paste to load an 81-character string (0 for empty).
- Blue digits in the solution were filled in by the solver.
Sudoku Variants
This solver handles standard 9×9 Sudoku only. We're building solvers for more variants.
Explore All Variants Try Killer SudokuLearn Techniques
How the Sudoku Solver Works
Our solver uses a backtracking algorithm - The same approach competitive programmers and AI systems use for constraint-satisfaction problems.
The Algorithm - Step by Step
- Find an empty cell. Scans top-left to bottom-right.
- Determine valid candidates. Checks row, column, and 3×3 box.
- Try each candidate. Places a digit and recurses.
- Backtrack on contradiction. Undoes the last placement if no candidates remain.
- Return the solution. When all 81 cells are validly filled.
Performance
| Metric | Value |
|---|---|
| Typical solve time | < 50 ms |
| Worst-case (near-empty) | < 500 ms |
| Max backtrack iterations | ~200 |
| No-solution detection | Instant |
When Should You Use the Solver?
Good Reasons
- Verify your completed puzzle
- Solve puzzles from newspapers or books
- Generate answer keys for worksheets
- Validate a hand-crafted puzzle has a unique solution
Less Useful For
- Skipping a puzzle - You lose the cognitive benefit
- Learning - No explanation of which technique was used
- Leaderboard scores - Solver-completed puzzles don't count
- Daily challenges - Use in-game hints instead
Want to solve puzzles yourself?
Our techniques guide covers all ten solving methods - From Last Free Cell to X-Wing.