Sudoku Solver

Enter a Sudoku puzzle and get the solution instantly — works on any valid 9×9 grid.

Status
Enter a puzzle and press Solve
AdvertisementAd slot #1 · below the result

What it does

Enter a Sudoku puzzle by typing the given digits into the grid, press Solve, and the tool fills in every empty cell. It handles any valid 9×9 puzzle — easy, medium or hard — and tells you immediately if the puzzle has no valid solution. Everything runs in your browser; no data is sent anywhere.

How Sudoku works

A standard Sudoku is a 9×9 grid divided into nine 3×3 boxes. Some cells are pre-filled with digits (the “givens”). The goal is to fill every empty cell with a digit from 1 to 9 so that:

  • Each row contains every digit exactly once.
  • Each column contains every digit exactly once.
  • Each 3×3 box contains every digit exactly once.

A well-formed puzzle has exactly one solution. The constraints are tight enough that even a puzzle with only 17 givens can pin down every cell.

How the solver works

The solver uses backtracking: it scans the grid for the first empty cell, tries each digit 1–9, and checks whether the digit conflicts with the same row, column or box. If a digit fits, it moves to the next empty cell and repeats. If no digit fits, it backtracks to the previous cell and tries the next candidate. When every cell is filled without conflict, the puzzle is solved.

Before solving, the tool checks whether any given digits already conflict with each other. If they do, it reports the puzzle as unsolvable and highlights the conflicting cells.

Worked example

The seeded puzzle has 30 givens. The solver fills the remaining 51 cells by backtracking through the constraints. For instance, the first empty cell (row 1, column 3) must be a digit that does not appear in row 1, column 3 or the top-left box — the only candidate is 4.

Tips for entering puzzles

  • Use the arrow keys to move between cells and type a digit to set it.
  • Press Backspace or Delete to clear a cell.
  • Conflicting digits are highlighted in red as you type.
  • Press Clear to empty the entire grid.

Common uses

  • Stuck on a puzzle: enter the digits you have and let the solver fill in the rest.
  • Checking your answer: compare your solution against the solver’s.
  • Learning: see how a finished grid satisfies all three constraints at once.

Frequently asked

How fast is the solver?

Backtracking solves most published puzzles in well under a second. Even notoriously hard puzzles rarely take more than a few hundred milliseconds in a modern browser.

What if the puzzle has more than one solution?

The solver returns the first valid solution it finds. A well-formed Sudoku has exactly one solution, but if you enter an under-constrained grid (too few givens), the solver will still fill it — just not necessarily the solution you had in mind.

Can I enter a puzzle from a newspaper or app?

Yes. Type each given digit into the matching cell and leave the unknowns empty. The grid matches the standard left-to-right, top-to-bottom layout used by newspapers and apps.

You can read how every ToolHare tool is checked on the how we build and verify tools page.

AdvertisementAd slot #2 · after the explainer