Sudoku Constraint Solver

Find all assignments of 1-9 that satisfy your constraints. All variables must be different.

Need help with constraint syntax?

Each line is its own constraint, and every line must be true at the same time for a solution to be valid.

Comparisons

==equal to
!=not equal to
>greater than
>=greater than or equal to
<less than
<=less than or equal to

Restricting to a list of values

  • a in [1, 2, 5] — a must be one of these values
  • a not in [6, 8] — a must not be any of these values

Combining conditions on one line

  • a > 3 and b < 5 — both conditions must hold
  • a == 1 or a == 9 — at least one condition must hold

Arithmetic

  • a + b == c — combine variables and numbers with +, -, *, /