SAT Instance Generator
A conjunction of clauses, each an or of three literals — the shape every SAT solver takes as input. What makes a generated instance useful is knowing the answer, and at five variables or fewer that is decidable outright: all thirty-two assignments are tried, so an instance labelled unsatisfiable has been proved so rather than guessed. Ask for satisfiable or unsatisfiable and the generator keeps drawing until it finds one.
What this generator does
Draws clauses of three distinct literals over the chosen variables and solves the result by trying every assignment. Instances are redrawn until the requested kind appears, and the number of satisfying assignments is reported alongside the verdict.
How to use this tool
- Choose the variable count and how many clauses to include.
- Decide whether you want a satisfiable instance or an unsatisfiable one.
- Try to find an assignment that satisfies every clause.
- Reveal the verdict and, when there is one, a satisfying assignment.
Understanding the controls
- How many variables
- Between 2 and 5. Exhaustive solving is what makes the label trustworthy, and that is only affordable at this size.
- How many clauses
- Between 2 and 20. More clauses over the same variables makes satisfiability rarer — that transition is why random 3-SAT is studied.
- Want a satisfiable one
- On, the generator keeps drawing until it finds a satisfiable instance. Off, until it finds one that no assignment satisfies.
- Seed
- Reproduces the same clauses exactly, which matters because whether an instance is satisfiable is the whole point of it.
- Show the answer
- Reveals the verdict and a satisfying assignment where one exists.
Common use cases
- Test instances for a SAT solver with the answer known
- Showing the satisfiability threshold as clauses are added to fixed variables
- Teaching conjunctive normal form on concrete examples
- Practice at finding an assignment by hand
- Reproducing a specific instance from a seed
How this generator works
Every one of the two-to-the-variables assignments is tested against every clause, which both decides satisfiability and counts how many assignments work. The check re-runs that search independently and requires the stated verdict, count and assignment all to agree with it.
Randomness and fairness
The clauses are random; the satisfiability verdict is proved by exhaustive search rather than estimated. Seeded instances reproduce and are therefore explicitly not cryptographically secure. Unseeded, the browser's cryptographically secure generator draws the clauses.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Five variables is the ceiling, because the guarantee comes from trying every assignment.
- Clauses hold three literals — or fewer when there are fewer variables — so this is 3-SAT rather than general CNF.
- Duplicate and trivially true clauses are possible, since literals are drawn independently per clause.
- No solver trace is shown, only the verdict and one assignment.
- Instances vanish when you leave; seed one you want to hand to a solver later.
Privacy and your data
Clauses and the search over them run entirely in your browser. Nothing is transmitted or retained.
Related generators
- Truth Table GeneratorThe full truth table for an expression you type — or one drawn for you — with the grouping shown fully bracketed and a tautology or contradiction verdict counted from the rows.
- Logic Gate Circuit GeneratorRandom acyclic gate circuits with their equivalent expression and full input-output table, the two required to agree everywhere.
- Karnaugh Map Challenge GeneratorGrey-coded Karnaugh maps filled from a real expression, with the largest valid groups found and each one proved to cover only true cells.
- Test Matrix GeneratorTurn parameters and their values into a test matrix — full factorial, a random sample, or all-pairs coverage in a fraction of the cases.