🧩 Sudoku Solver

Type a puzzle or load an example, then solve it instantly or watch the algorithm work.

How does it work?

The solver uses backtracking: it places a digit that fits, moves on, and if it later gets stuck it undoes that choice (red flash) and tries the next one.

Two tricks make it fast. Every row, column, and box keeps a bitmask of digits it already uses, so checking a move is one bitwise operation. And it always fills the cell with the fewest possible digits first, so forced moves happen early and dead ends are found quickly.