Sudoku Solver — Solve Any Puzzle

Type your puzzle into the grid and solve it in one click — or check it has a single valid answer, or step through the logic one hint at a time. Everything runs in your browser, nothing is uploaded.

How to Use the Solver

Click any square and type the given numbers from your puzzle — press 1–9 to fill, arrow keys to move, backspace to clear. Then choose an action. Solve completes the whole grid, showing your clues in black and the solved cells in blue. Check tells you whether the puzzle has exactly one solution (a proper Sudoku does). Hint reveals only the next square you can place by logic, and names the technique — so you can keep solving yourself. New here? Tap Example to load a puzzle.

How the Solver Works

The solver treats the grid as a constraint puzzle: every empty square starts with the candidates 1–9, and each filled square removes that number from its row, its column, and its 3×3 box. It then searches — always choosing the square with the fewest remaining candidates first (the classic "minimum remaining values" heuristic) and backtracking whenever a choice leads to a dead end. That guarantees a solution to any solvable 9×9 grid, and finds it in milliseconds. The Check button runs the same search but counts to two, so it can tell a unique puzzle from an ambiguous one. All of it runs on your device — your puzzle never leaves the browser.

Sudoku Solving Techniques

Almost every standard Sudoku can be cracked by logic alone — you rarely need to guess. These are the techniques the Hint button reaches for, listed in the order most solvers use them. When you get stuck, work down the list until one of them opens up a square.

  • Naked single. Cross off the numbers already used in a square's row, column and 3×3 box. If only one candidate survives, that number has to go there.
  • Hidden single. Take one row, column or box and pick a number. If there is only one square in that unit where the number can legally sit, place it — even if that square still shows other candidates.
  • Naked pair. When two squares in the same unit share the exact same two candidates, those two numbers are locked to that pair. Remove them from every other square in the unit, which often uncovers a fresh single.
  • Pointing pair & box-line reduction. If a candidate inside one box is confined to a single row or column, it must land on that line — so you can erase it from the rest of that row or column outside the box, and the reverse works too.
  • X-Wing. When a candidate appears in exactly two squares on each of two rows, and those squares line up in the same two columns, the candidate can be removed from the rest of those columns. The same pattern works with rows and columns swapped.

The hardest "diabolical" grids can exhaust these human techniques and still need a trial step. That is where Solve takes over: it uses backtracking search to try a candidate, follow the consequences, and rewind the moment it hits a contradiction — guaranteeing a finished grid even when pure logic runs out.

Frequently Asked Questions

How do I enter my puzzle?
Type your puzzle's given numbers into the grid: click a square and press a number key (1–9), and the cursor jumps to the next square automatically. Use the arrow keys to move around and backspace to clear a square. Leave the blanks empty — those are what the solver fills in. Then press Solve to complete the grid, Check to confirm the puzzle has exactly one answer, or Hint to reveal only the next logical step.
Can it solve any Sudoku?
Yes — the solver handles any standard 9×9 Sudoku, at every difficulty from gentle to diabolical. It uses backtracking search, so if a valid completion exists it will find it. It is built for the classic 9×9 grid, not 16×16 or Killer Sudoku variants.
What does "multiple solutions" mean?
A proper Sudoku has exactly one answer. If Check reports more than one solution, your clues are ambiguous — usually a missing or mistyped given. Add the missing clues and it will resolve to a single solution.
What techniques do the hints use?
Hint looks for the next square you can fill by pure logic: a naked single (only one number can go in that square) or a hidden single (only one square in a row, column, or box can take a given number). It names the technique it used and fills just that square. You carry on solving the rest yourself, so the hint teaches a method instead of handing over the finished grid.
Can every Sudoku be solved with logic alone?
Most published puzzles can — a well-set Sudoku is designed to be solved by deduction, working from singles up through pairs and pointing pairs. A handful of the very hardest grids reach a point where no known human technique breaks through and you have to test a candidate to see if it holds. The Solve button always finishes the grid because it falls back on backtracking search, which does exactly that trial step for you.
How do I solve a hard Sudoku when I'm stuck?
Work the techniques in order: place every naked and hidden single first, then hunt for naked pairs and pointing pairs to strip candidates from the rest of a row, column or box — that usually reveals a new single. If you are still stuck, press Hint: it finds the next square you can place by logic and names the technique, so you get unstuck without seeing the whole answer.
Is anything uploaded?
No — nothing you type is uploaded. The whole solver runs in your browser, so your puzzle is never sent to a server. Closing the tab clears everything.

Add This Sudoku Solver to Your Website

Put the full solver on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers, so nothing they type is ever uploaded. Copy the snippet and paste it into your page's HTML.

The credit line under the widget links back to LK Forge — please keep it so other people can find the solver too.

Related Solvers & Puzzles

Prefer to play? Try the full AI Sudoku game with hints and difficulty levels. Solving other games? Use the Connect 4 Solver or the Minesweeper Solver. Or browse all AI solvers & analyzers.