Sudoku Solver

Enter the numbers you have, and get the full solution instantly.

Last updated: September 23, 2026

Enter the starting numbers from your puzzle, leaving the rest blank.

How to use this Sudoku solver

Type each known number from your puzzle into its matching cell, leaving empty cells blank. Click "Solve" and the tool fills in the complete, valid solution using a backtracking algorithm, the same logical trial-and-error approach human solvers use, just applied far faster and more exhaustively.

A quick Sudoku rules recap

A standard Sudoku grid is 9x9, divided into nine 3×3 boxes. A solved puzzle has every row, every column, and every 3×3 box containing each of the digits 1 through 9 exactly once, with no repeats anywhere. Puzzles start with some cells already filled in as clues, and the goal is to deduce the rest using those constraints.

How the solving algorithm works

This solver uses backtracking, a systematic trial-and-error technique: it finds the first empty cell, tries placing 1, then checks whether that breaks the row/column/box rule; if it's valid, it moves to the next empty cell and repeats, and if not, it tries 2, then 3, and so on up through 9. When every option in a cell fails, the algorithm "backtracks" to the previous cell and tries its next option instead, gradually working through the possibilities until the entire grid is filled validly. Because the row, column, and box rules eliminate most wrong guesses almost immediately, this approach solves even difficult puzzles in a fraction of a second.

What makes a Sudoku puzzle valid?

A solvable Sudoku has exactly one number from 19 in every row, column, and 3×3 box, with no repeats. Mathematically, a puzzle needs at least 17 starting clues to guarantee exactly one solution with fewer clues, more than one valid completed grid could exist. If your starting numbers already break one of the placement rules, or don't have enough clues to lead to a unique solution, the solver will let you know.

FAQ

Why does it say no solution exists?
Double-check you entered every number in the right cell a single misplaced digit can make a puzzle unsolvable.

Is my puzzle sent anywhere?
No the entire solving algorithm runs locally in your browser.

How does the backtracking algorithm actually work?
It finds the first empty cell, tries the numbers 1 through 9 in order, and places the first one that doesn't conflict with the row, column, or 3x3 box. It then moves to the next empty cell and repeats. If it ever reaches a dead end, it backtracks to the last cell it filled, tries the next possible number there instead, and continues repeating until the whole grid is filled correctly.

Will this always find a solution instantly?
For a standard 9x9 puzzle, yes backtracking with basic constraint checks solves even very hard Sudoku puzzles in a fraction of a second on modern hardware, since the row/column/box rules eliminate most bad guesses quickly.

How many starting numbers does a puzzle need to have one unique solution?
Research has shown a minimum of 17 given clues is required for a puzzle to have exactly one valid solution fewer than that, and multiple different completed grids could satisfy the rules, though this solver will still return a valid solution for an under-constrained puzzle.