The quick answer
This 9×9 solver takes any puzzle you type (tap cells and enter digits, zeros or blanks for unknowns) and returns the completed grid instantly, plus a step count and a conflict check that flags mistyped clues by cell. The classic 30-clue example loads pre-filled, cells use numeric input mode for phones, and everything runs locally in your browser.
Stuck on the Tuesday puzzle, one cell from done
It is 9:40 on a Tuesday evening. The puzzle has collapsed to four empty cells, and three of them are easy; you can see the cascades from here. The fourth, row five, column seven, refuses to commit. Every digit you try breaks something two rows down, and you have now re-derived the same three contradictions four times. The pencil has made two attempts and erased both.
This is the exact moment a sudoku solver is for. Type the grid in (or press Solve on the preloaded example for a test drive) and the solution appears instantly, with a conflict check that catches mistyped clues, a step count you can interrogate, and a button that fills the answer into the grid so you can read it the way you read any finished puzzle. Whether you take the whole solution or just the one cell you needed is between you and your conscience, and this page will have opinions about that later.
The interesting part of a solver is not raw speed; at 9×9 everything is fast. The interesting part is what the machine pays for the answer, and this one pays honestly, one brute-force placement at a time. This page covers the workflow, the machinery, worked examples with real step counts, and the edge cases that separate a good solver from a confident liar.
What this solver does, precisely
The contract is simple: grid in, verified solution out. You enter clues cell by cell (tap on a phone, where numeric input mode brings up the number pad, or type on desktop, where Tab walks you across the row), with 0 or an empty cell marking a blank. The classic 30-clue Wikipedia example loads pre-filled, so the tool works straight out of the box. When you press Solve, the clues are validated first: no duplicate digits within any row, column or box, so a mistyped 7 never gets laundered into a confidently wrong answer grid.
Two outcomes exist, and the tool distinguishes both: solved, with the completed grid and a step count; and refused, either direct clue conflicts named by row and column, or a consistent-looking grid that admits no completion at all, reported honestly as unsolvable. One caveat worth stating: the solver returns the first solution it finds and does not check for a second. Published puzzles are built to have exactly one, but a hand-made grid with too few clues may be completed with one of several valid answers, confidently.
Everything runs in your browser. That is not a speed claim (any server would also be fast); it is a data claim: the grid never leaves your device, there is no session or account, and the solver behaves the same on a plane as on wifi.
Solving a puzzle, step by step
The typical session takes under a minute, most of it typing. The tool sits above this section if you want to follow along with today's newspaper.
Enter the clues
Tap a cell and type a digit (the numeric input mode brings up the number pad on phones), or click and type on desktop, tabbing across the row. 0 or an empty cell marks a blank. The classic 30-clue example loads pre-filled, so you can press Solve immediately to see the machine work.
Press Solve
Validation runs first: any duplicate digits in a row, column or box are flagged by cell address, and no answer is offered until the clues are consistent.
Read the result note
A solved grid reports its step count (every digit tried, dead ends included). Clue conflicts come back named by row and column; a clue-consistent grid with no possible completion is reported as unsolvable instead of guessed at.
Fill the solution into the grid
One button transfers the answer into the cells, so the finished puzzle reads like any completed newspaper grid, the way most people want to see it.
Take what you needed
Full solution, or study one cell and re-derive the rest by hand; the same discipline as checking one answer in the back of the textbook instead of the whole page. Clear wipes all 81 cells for the next puzzle.
That last step is the difference between a solver and a spoiler machine. Take one hint, walk away, and the rest of the grid is still yours to earn.
The grid as a system of constraints
A sudoku board is 81 cells governed by 27 units: 9 rows, 9 columns and 9 boxes. Each unit must contain each digit 1 through 9 exactly once. Every cell belongs to exactly three units (its row, its column, its box) and therefore has 20 peers: the 8 other cells in its row, the 8 in its column, and the 4 in its box that are not already counted. Twenty peers, and a cell cannot equal any of them.
From that single rule the solver derives its working representation: for every empty cell, the candidate set, meaning digits not present among its 20 peers. A solved cell has a candidate set of exactly one digit; the grid is finished when all 81 do. Everything that follows is clever bookkeeping on those sets, and the technique names you may know from puzzle books (naked single, hidden single, naked pair) are all statements about them.
It is worth pausing on how small this makes the problem. Nine-by-nine sudoku has roughly 6.67 x 10^21 distinct solution grids, a number with 21 zeros, yet a specific puzzle's constraints collapse the search space so hard that a phone processor finishes in the time it takes the screen to redraw. Constraint tightness, not processor speed, is the story.
The human techniques: singles and pairs
Singles are the loop human solving runs on, the thing your eyes are doing while 'just scanning the grid.' Find a cell with exactly one candidate and place it, which removes that digit from its 20 peers' candidate sets, which may leave another cell with one candidate, and so on. The puzzle-book name is naked single: a cell whose own candidates have been whittled to one. Its sibling is the hidden single, a digit that has only one possible home within a unit, even though that cell still shows several candidates. Both are certainties wearing different disguises, and scanning for them is the closest thing sudoku has to a strategy.
Naked pairs are the first technique that eliminates rather than fills. Two cells in the same unit whose candidate sets are both exactly {6, 9} form a pair: those two cells must be 6 and 9 in some order, so no other cell in that unit can be either digit. The elimination does not place anything; it strips candidates from neighbors, which occasionally births a naked single elsewhere. Here is a constructed but realistic row to make it concrete:
Input
Row state: 4 _ _ 8 2 3 _ 1 _, with the missing digits 5, 6, 7, 9. Candidate sets: c2 = {6, 9}, c3 = {6, 9}, c7 = {5, 9}, c9 = {5, 7}. Columns and boxes have blocked the rest.Output
c2 and c3 form a naked pair on {6, 9}, locking those digits in the row. Eliminate 9 from c7 → c7 = {5} → place 5. Then c9 = {7} → place 7. Four blanks became two placements and a remaining pair, with no guessing anywhere.This solver uses none of that. It validates your clues and then backtracks (digits 1 through 9, first empty cell, conflict check) with zero technique intelligence and zero shame. The contrast is the instructive part: on the classic 30-clue example below, a human filling one logical single at a time places 51 digits with no dead ends; the machine tries 4,208 placements, most of which get undone, and finishes anyway, in a blink. Insight beats brute force on elegance. Brute force wins on not needing you to have a good day.
Backtracking: the whole engine, honestly
The engine, not a fallback but the whole machine, is the classic recursive algorithm: pick an empty cell, try a candidate digit, recurse; if the recursion hits a contradiction, erase the digit and try the next one. Every wrong guess is undone (backtracked), and the trail of attempts is exactly what the step count measures. The pseudocode fits in five lines:
def solve(grid):
cell = first_empty(grid) # reading order, row by row
if cell is None:
return True # grid complete
for digit in 1..9:
if no_conflict(grid, cell, digit):
place(cell, digit)
if solve(grid):
return True
erase(cell) # backtrack: undo and retry
return FalseOne honest simplification does most of the work here: the solver always fills the first empty cell it finds, in reading order, with digits 1 through 9, checking only direct conflicts. Fancier solvers pick the most constrained cell (the minimum-remaining-values heuristic) to prune the search tree harder, and on adversarial grids that matters. At 9×9 scale, the simple version already lands in milliseconds, and it has a side benefit: the step count is a pure, uncomplicated measure of brute-force cost, with no cleverness hiding in the meter.
Numbers make the argument better than adjectives. Take the famous example puzzle used later on this page, the 30-clue grid from the sudoku Wikipedia article. A plain backtracker that fills the first empty cell with digits 1 through 9, checking only direct conflicts, tries 4,208 placements before finishing. The same puzzle, run through propagation first, places all 51 missing digits as naked singles and finishes with zero guesses. Four thousand trial placements versus fifty-one certain ones: that ratio is the entire case for constraint propagation, measured on a real grid rather than asserted.
| Grid | Clues | Trial placements | What the count shows |
|---|---|---|---|
| Empty grid | 0 | 391 | The reading-order walk finds the lexicographically first solution almost immediately |
| Classic example (preloaded) | 30 | 4,208 | The Wikipedia puzzle the tool ships with, solved in a blink |
| Same puzzle, 4 clues stripped (r1c1, r2c1, r7c2, r8c4) | 26 | 58,369 | Dead ends multiply as anchors vanish; still under a second |
A worked example, grid in and grid out
Here is the classic 30-clue example, the puzzle illustrated on the sudoku Wikipedia page, in the exact format the tool expects: one digit per cell, zeros for blanks (empty cells work too; dots do not parse). It loads pre-filled, so your first Solve press is one tap away.
Input
530070000 600195000 098000060 800060003 400803001 700020006 060000280 000419005 000080079
Output
534678912 672195348 198342567 859761423 426853791 713924856 961537284 287419635 345286179 Step count: 4,208 placements, every digit the solver tried (dead ends included) before the grid closed.
The step count is the interesting half of that block: 4,208 placements for this puzzle, each one a digit tried (dead ends included, because the counter ticks on every placement before the recursion either commits or rewinds). The gap between 51 empty cells and 4,208 steps is the price of not thinking, and the machine pays it in microseconds. The cascade of easy singles you would solve by hand is, to the backtracker, just a tree it happens to walk quickly.
For contrast, take the same puzzle and strip the four clues at row 1 column 1, row 2 column 1, row 7 column 2 and row 8 column 4: 26 clues left, the original solution still valid. The step count jumps to 58,369, because fewer anchors for the early cascades means more wrong branches explored and undone, and the meter records every one. Push far enough down toward the 17-clue minimum and the count keeps climbing, though at 9×9 it stays within a human 'instant.' That is what a step count is for: watching the cost of missing information.
Edge cases: broken grids and honest answers
Most solver bugs are honesty bugs: the tool returns an answer when the truthful response was none. These are the boundaries this solver keeps.
- Direct clue conflicts (two 8s in one row) are flagged before solving, named by row and column. No solve is attempted on a contradictory input.
- Unsolvable-but-consistent puzzles pass the clue check and fail in search: the clues never clash directly, but every completion breaks a constraint somewhere. The solver reports unsolvable rather than returning a partial grid dressed as an answer.
- Under-clued puzzles can have thousands of solutions, and this solver does not test for that: it returns the first completion it finds, with no ambiguity warning. Published puzzles are built unique, so this bites almost exclusively on homemade grids; treat any answer to a grid you stripped clues from as one of several possible.
- Seventeen is the floor: McGuire, Tugemann and Civario proved in 2012 by exhaustive search that no 16-clue puzzle with a unique solution exists. The proof consumed roughly 7.1 million core-hours of computer time, which is a reminder that easy-to-play and easy-to-analyze are different universes.
- Transposition errors are the leading user-side failure: one wrong digit makes a legitimate puzzle unsolvable, and the symptom is an error message rather than a solution. The conflict checker catches the direct cases; the rest fall to proofreading your entry.
- Variant grids (6x6, 16x16, Samurai, Killer) are out of scope for this solver. The engine's unit model is hard-coded to 9x9 because that is where the daily-use demand lives.
Who keeps a solver bookmarked
The stuck-solver crowd is the obvious constituency, and the returning pattern is written into the genre itself: people come back on roughly a daily rhythm, which is the rhythm of newspaper puzzles. Within that group the honest split is between checkers (solve by hand, verify here) and cell-takers, who use the solver as a precision hint machine for exactly one stubborn digit. Both uses are legitimate; the step count serves both.
Learners use it as a technique trainer. Solve a puzzle by hand, then press Solve on the same grid and compare: your 51 considered placements against the machine's 4,208 blind trials is a lesson in what thinking buys. Teachers assign exactly that exercise, solve by hand then reconcile your reasoning against the machine's count, because the disagreement is where the learning happens. The constructed row example earlier on this page is drawn from that exercise.
Developers show up too, usually mid-argument: implementing the algorithm, benchmarking propagation versus search, or generating puzzles by removing clues from a solution grid and testing uniqueness, the same pipeline that produced the 26-clue variant above. For that crowd the honest numbers on this page are the point: 4,208 versus 51 is a benchmark result you can reproduce from the example block.
Solver versus hint apps versus paper
The alternatives differ mostly in how much of the answer they insist on giving you.
| Approach | Gives you | Costs you |
|---|---|---|
| This solver | The full grid plus a brute-force step count, instantly, free | The solve, if you take everything at once |
| Hint-style apps | One graded nudge at a time, paced | A subscription, usually, and a nudge schedule the app controls |
| Paper and patience | The entire point of the hobby | Tuesday evenings, plural |
No tool on this site will lecture you about the third row of that table. The recommendation, offered once and then dropped: use the step count after finishing by hand, and the grid-fill when you need out. And if the puzzle-a-day habit has you hunting variety elsewhere, the Trivia Question Generator and Wordle Solver scratch the same daily-ritual itch in different costumes; links to both sit further down this page.
A puzzle grid is nobody's business
Privacy sections on a sudoku page are usually filler. This one gets one honest paragraph: the grid you enter is processed entirely on your device, nothing you type is stored anywhere, and there is no account to tie your solving habits to.
The reason it is worth saying at all is architectural rather than principled: the same backtracking engine that runs in your browser tab would run identically on a server, but a page that computes locally has no reason to exist as a service with log files, rate limits or an eventual premium tier. Solver pages that grew into apps grew those things. This one stays a page.
Frequently asked questions
These questions come up around the tool most often, and the longer treatments live in the sections above.
How fast is this sudoku solver?
Effectively instant: the classic 30-clue example takes 4,208 trial placements and finishes before the screen redraws, because 9×9 is a small problem for a modern processor. Speed was never the interesting part; what the count means is.
What happens if I enter an invalid puzzle?
Validation runs the moment you press Solve. Two identical digits in the same row, column or box are flagged by cell address, and no solution is offered until you fix them. A puzzle whose clues don't clash directly but can't be completed is reported as having no solution; the tool would rather refuse than launder your typo into a confident wrong grid.
Can a sudoku have more than one solution?
Yes, if it is under-clued. Properly published puzzles have exactly one, but remove too many clues and multiple grids satisfy every constraint. This solver returns the first solution it finds and does not test for a second; an under-clued homemade grid may be completed with one of several valid answers, without a warning. If uniqueness matters, remember the 17-clue minimum.
Does the solver explain its steps?
No. It reports a step count, not a technique trail. Every digit tried ticks the counter, including the ones later undone by backtracking. Pair the number with the human-techniques section above: 4,208 blind trials versus 51 logical placements is the whole brute-force-versus-insight story in two numbers.
What is the minimum number of clues a sudoku can have?
Seventeen. A 2012 proof by McGuire, Tugemann and Civario established by exhaustive computer search that no 16-clue puzzle with a unique solution exists, after years of cataloging thousands of valid 17-clue puzzles.
Can I paste a puzzle as text?
Not in this version; there is no paste box. Enter clues cell by cell, with 0 or an empty cell marking an unknown (dots do not parse), or start from the preloaded 30-clue classic. Cell-by-cell entry on a 29-clue newspaper puzzle takes about a minute, which the tool repays by being stateless and instant.
Is using a sudoku solver cheating?
Against yourself, maybe; against the paper, no. The productive uses are checking a finished grid, unsticking exactly one cell so you can finish by hand, and studying the step count against the techniques section to learn what you missed. If your goal is the solve itself, treat the solver as an answer key with a meter attached.
Does the solver work on my phone?
Yes. The grid is 81 tap targets with numeric input mode, so tapping a cell brings up the number pad on iOS Safari and Android Chrome alike. No install, no account, and the solving needs no network once the page has loaded.
Neighbor tools and the short version
The solver lives among a small cluster of daily-driver diversions, and these three share the most workflows with it.
- Wordle Solver: the same constraint-elimination brain applied to five letters instead of 81 cells.
- Trivia Question Generator: for the post-puzzle coffee break that wants questions instead of digits.
- Random Number Generator: dice, draws and raffles when the evening moves on from puzzles.
When the grid needs an arbiter rather than a roll of the dice, the DnD Dice Roller covers the chance-based half of game night; the solver stays deterministic on principle.
The short version: this is a 9x9 sudoku solver that validates your clues, tells solved from unsolvable, and reports an honest step count (trial placements, dead ends included) instead of pretending to a technique trail. The method is documented above with numbers you can reproduce, the classic 30-clue example puzzle loads pre-filled, and the grid never leaves your device. Type in Tuesday's puzzle and see which kind of evening it becomes.
Sources and further reading
- ArXiv: There is no 16-clue Sudoku (McGuire, Tugemann, Civario, 2012)(arxiv.org)
- Peter Norvig: Solving Every Sudoku Puzzle(norvig.com)
- Wikipedia: Sudoku(en.wikipedia.org)
- Wikipedia: Backtracking(en.wikipedia.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.