How to Check if a Sudoku Is Valid
Separate conflict checks, solvability and uniqueness, with a 4×4 example that has no duplicate givens but no solution.
Want a better break than more reading?
Open a fresh Sudoku grid, keep the rules simple, and turn this article into actual practice.
Get the iPhone App →“Is this Sudoku valid?” can mean three different things: the current entries obey the rules, the givens allow a completed grid, or the puzzle has exactly one solution. Checking only for repeated digits answers the first question.
Use three separate checks
| Check | What it establishes | What it does not establish |
|---|---|---|
| No conflicts | No entered digit repeats within its row, column or box. | A completion exists. |
| At least one solution | The givens can be extended to a completed legal grid. | The completion is unique. |
| Exactly one solution | Only one completed grid fits the givens. | The puzzle is easy, or every human solver can find a short logical route. |
For a completed classic 9×9 grid, check that every cell contains a digit 1–9 and each row, column and 3×3 box contains all nine exactly once. An unfinished grid needs the additional existence and uniqueness checks if you are evaluating it for publication.
A conflict-free position that cannot be completed
This miniature example uses digits 1–4 and 2×2 boxes. A dash is empty.
| Row | c1 | c2 | c3 | c4 |
|---|---|---|---|---|
| r1 | 1 | 2 | 3 | — |
| r2 | — | — | — | 4 |
| r3 | — | — | — | — |
| r4 | — | — | — | — |
The givens contain no duplicate in a row, column or box. Yet r1c4 must be 4 to finish the first row, while column 4 already contains a 4 at r2c4. That cell has no legal value. The position has zero solutions even though a simple duplicate check passes.
How to check uniqueness responsibly
A solver must search for a second solution after finding the first. Zero solutions means the givens are inconsistent; one means unique; two or more means non-unique. A tool can stop after finding the second solution when your only question is uniqueness. A “solved” message by itself does not tell you whether that second search was done.
If you are using a Sudoku solver, read what the tool actually reports. Do not infer uniqueness from the displayed solution unless it explicitly checks for alternatives. Difficulty scoring is another separate process.
If you are checking your own entries
- Keep the original givens fixed and identify your most recent edits.
- Check the edited cell’s row, column and box for duplicates.
- If a cell has no candidate, review earlier entries rather than changing an original clue.
- Use Undo or a saved original board to narrow down the first unsupported placement.
An entry can be wrong without causing an immediate duplicate. Compare it with the original puzzle or establish the deduction that supports it. For recovery steps during play, use the Sudoku mistake guide.
Get a better Sudoku habit in your inbox
A quick daily puzzle reminder, streak motivation, and the occasional useful PS News update.