Sudoku Solver - Free Online Sudoku Puzzle Solver

What Is a Sudoku Solver?

A Sudoku solver takes the 81 cells of a 9×9 Sudoku grid - some filled with starting numbers, the rest empty - and completes it for you: every row, every column and every 3×3 box ends up containing the digits 1 through 9 exactly once. You type in the puzzle from your newspaper or app, press Solve, and the finished grid appears instantly, with a verdict on whether the answer is unique.

This one goes a step further than a bare answer key. A 💡 Hint button walks you through the puzzle the way a human would, one logical step at a time - pointing out naked singles and hidden singles with a plain-English explanation - so you can finish the puzzle yourself and actually learn from it. And if your grid contains a mistake, the solver proves there is no solution at all rather than showing a wrong answer. Everything runs in your browser: no sign-up, no waiting.

How to Use the Sudoku Solver

  1. Enter the givens. Type each starting number into its cell - 1 to 9, one digit per cell.

  2. Press Solve. The empty cells fill in green and the status line reports whether the solution is unique.

  3. Or ask for a Hint. The 💡 button fills in exactly one cell that follows from pure logic and explains why - for example "naked single: only 8 can go in row 1, column 1". Keep tapping to solve the puzzle at human speed.

  4. Multiple solutions? If your givens allow several valid completions, the solver tells you and shows one - a properly made Sudoku should have exactly one.

  5. No solution? Contradictory givens (the same digit twice in a row, column or box) are detected immediately - usually a typo in your entry.

  6. Reset or explore. Clear wipes the grid, and Example deals a fresh puzzle with a guaranteed unique solution.

What the Solver Tells You

Beyond the filled grid, the status line carries real information. Unique means your puzzle has exactly one solution - the gold standard for published Sudokus. Multiple solutions means the givens under-determine the grid; any of the answers shown is valid, but purists will want more clues. No solution means the givens contradict each other. Here is a 34-clue puzzle solved by the tool:

Sudoku solver completing a 32-clue 9×9 puzzle with a unique solution, solved cells in green

And when the givens are broken - the row below starts with two 5s - the solver refuses the puzzle outright instead of inventing an answer:

Sudoku solver reporting no solution for two identical 5s givens in one row

The Hint Button: Logic, Not Luck

The hint engine mirrors how experienced solvers think, in increasing order of effort:

  • Naked single. A cell whose row, column and box already cover eight of the nine digits - exactly one candidate survives, so it must go there.

  • Hidden single. A digit that has only one possible home within its row, its column, or its 3×3 box - even if that cell itself could hold several values.

Every hint fills one cell and states its reason, so a beginner can follow the entire solve without ever seeing a brute-forced answer. When no single-level step exists, the solver says so honestly rather than pretending - deeper patterns like naked pairs and X-wings are the next milestone.

How the Sudoku Solver Works

The engine is a backtracking search guided by the MRV heuristic - "minimum remaining values". It keeps a 9-bit mask for every row, column and box recording which digits are used, so the candidates for any cell are computed with a few bitwise ANDs. At each step it fills the empty cell with the fewest candidates: cells with a single candidate are placed immediately, and dead ends are abandoned the moment any cell runs out of options. That pruning is why even an empty grid solves in about a tenth of a millisecond.

For the uniqueness check, the search deliberately continues after the first solution until it either finds a second one or proves the tree is exhausted. The Example button uses the same machinery in reverse: it builds a random completed grid, then digs cells out one by one, keeping each removal only if the puzzle stays uniquely solvable - the same way published puzzles are carved.

Worked Example: A 34-Clue Sudoku, Solved by Logic

Here is a puzzle dealt by the Example button - 34 givens, a unique solution, and a full chain of singles from start to finish. Bold numbers are the givens, green numbers are the solver's fill-ins:

836749251
915283467
724156938
361527894
592834176
478691325
683912745
149765382
257481639

The finished 9×9 grid of the worked example above - bold = givens, green = solved cells.

The hint chain opens like this: (row 1, column 1) = 8 is a naked single - its row already holds 7, 4, 9, 2, 5, 1, its column holds 9, 3, 4, 6 and its box holds 9, 1, 4, leaving 8 as the only survivor. (row 2, column 9) = 7 follows the same way, then (row 2, column 3) = 5, and the cascade continues - a chain of naked singles alone completes this particular grid without a single guess. That is typical: most newspaper puzzles fall entirely to naked and hidden singles, which is exactly what the hint button automates.

Tips for Solving Sudoku Faster

  • Scan for singles first. Before anything clever, sweep every empty cell and every digit for naked and hidden singles - they clear most of an easy grid.

  • Count, don't stare. For each empty cell, mentally list which of 1-9 are already in its row, column and box; three quick counts beat one long stare.

  • Use box-line reductions. If a digit can only sit in one row of a 3×3 box, eliminate it from that row's other boxes - and vice versa.

  • Mark real candidates, not ink blots. A pencil mark should mean "the rules allow this", not "maybe this"; sloppy marks hide naked pairs.

  • Naked pairs prune pairs. Two cells in a unit sharing exactly the same two candidates let you erase both digits from the rest of that unit.

  • When stuck, get systematic. Pick the digit with the fewest open positions left and map every place it can still go - hidden singles hide exactly there.

Is Sudoku Good for Your Brain?

Sudoku is a pure deduction workout: no vocabulary, no trivia, just constraint logic. Regular play strengthens working memory (holding candidate sets in your head), scanning discipline (checking three units per cell without losing your place), and error awareness - one contradicted sign means something upstream is wrong, which trains self-checking. Studies of puzzle play associate it with better maintained reasoning skills in older adults, and the graded difficulty curve makes it a habit that scales from a coffee break to a serious session.

Frequently Asked Questions

How does this Sudoku solver work?

It runs a backtracking search guided by the minimum-remaining-values heuristic, using bitmasks for rows, columns and boxes. It also continues searching after the first answer to verify uniqueness.

Can every Sudoku puzzle be solved?

Every valid puzzle can - but grids with contradictory givens have no solution at all, and grids with too few clues may have many. The solver distinguishes all three cases.

What does it mean if my puzzle has multiple solutions?

It means the givens do not force a single answer: several different completed grids obey all the rules. Newspaper puzzles should never do this - if yours does, you may have miscopied a clue.

What is a naked single?

An empty cell whose row, column and box together forbid eight of the nine digits, leaving exactly one legal candidate - the most basic logical placement in Sudoku.

What is a hidden single?

A digit that can only go in one cell of its row, column or box, even though that cell might look like it has several candidates. Hidden singles are the workhorse of most solves.

Will the hint button just give me the answer?

No - it fills exactly one cell that follows from pure logic and explains the reasoning, so you can keep solving yourself. Only the Solve button completes the whole grid.

Does the solver handle 4×4, 6×6 or variant Sudokus?

This page targets the classic 9×9 grid. For variants like Killer, Kropki or xv sudoku, play them directly - the underlying row-column-box logic is the same.

Is this Sudoku solver free?

Completely free with no sign-up. Solving runs entirely in your browser after the page loads, so it even works offline.

Play Sudoku Online

Prefer playing to solving? Try our free Sudoku game, challenge its cousins killer sudoku and kropki sudoku, or explore more tools like the 24 Game Solver.