Gridaday0 day streak

Sudoku solver

This sudoku solver works the way a person does: type the givens of any 9x9 sudoku, press Solve, and step through the solution one move at a time, each with the technique and the reason. It uses the same solver that grades our daily puzzles, so it also tells you how hard the grid is on our scale, and whether it has exactly one solution.

How to enter a sudoku

Type the givens into the grid, row by row: the cursor jumps to the next cell after each digit, and the arrow keys move around. Or paste the whole grid as text, 81 characters read left to right and top to bottom, with a digit for each given and a 0 or a dot for each empty cell; spaces and line breaks are ignored. The example button loads a Hard sudoku from our own bank.

What the answer means

  • Solved step by step. Every step followed from the rules, so the sudoku has exactly one solution and never needs a guess. The solver also says how hard it would be on our scale: Easy needs only singles, Medium pointing, box-line reduction or pairs, Hard triples, an X-Wing or a Y-Wing, and Expert a short what-if check.
  • One solution, but it needs a guess. The techniques stall, and the search finds exactly one way to finish the grid. Such a sudoku can be solved by trying a digit and following the consequences, which is what the search does.
  • More than one solution. The givens allow at least two grids; the last frame outlines the cells that differ. A sudoku with fewer than 17 givens always has more than one, and a printed puzzle that does this usually has a typo.
  • No solution. No grid keeps every row, column and box free of repeats; the message names the cell or house where logic broke down. Two copies of a digit in one row, column or box are reported before solving.

How it works

The steps come from the solver that grades our daily sudoku: it always takes the simplest technique that makes progress, from naked and hidden singles to X-Wing, Y-Wing and the what-if check, and each step names the cells it decides. When the techniques stop, the search takes the cell with the fewest candidates, tries each digit in turn, and backs up when a cell runs out of digits. It stops at the second solution, or after 200,000 branches or 3 seconds, whichever comes first. Everything runs in your browser: the grid is not sent anywhere.

Sudoku solutions and hints

If you only want a nudge, use it as a sudoku helper: step through to the first move you missed and stop there. As a sudoku solutions solver it gives the whole grid; as a sudoku solver, step by step, it gives the reasons. It is a free sudoku solver online for the classic grid only: a sudoku solver 9x9, without 4x4, 6x6 or the variants. For a sudoku you are playing on this site, the hint button does the same on your own board, one step at a time. Every sudoku we publish is solved step by step by this solver, and a separate program confirms that its solution is the only one; how we make the puzzles explains both checks, and the sudoku techniques page shows every rule the solver uses, with diagrams.

Questions

Can a sudoku have more than one solution?

Yes, if it has too few givens or a typo: no sudoku with fewer than 17 givens has a single solution, and some with more still have two or more. This solver reports when that happens and outlines the cells that differ.

Is this sudoku solver free?

Yes. It runs in your browser, free and without a limit, and the grid you type is not sent anywhere.