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 Sudoku
Learn Techniques

Understanding the techniques makes you a better solver.

View All Techniques Play a Puzzle

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
  1. Find an empty cell. Scans top-left to bottom-right.
  2. Determine valid candidates. Checks row, column, and 3×3 box.
  3. Try each candidate. Places a digit and recurses.
  4. Backtrack on contradiction. Undoes the last placement if no candidates remain.
  5. Return the solution. When all 81 cells are validly filled.
Performance
MetricValue
Typical solve time< 50 ms
Worst-case (near-empty)< 500 ms
Max backtrack iterations~200
No-solution detectionInstant

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?