Free · no sign-up · nothing uploaded
Nonogram solver: type the clues, get the picture
The clues of a 10 × 10 puzzle are filled in below and already solved. Type your own numbers — one field per row or column, spaces or commas — and press Solve, or press Step to watch the line logic decide cells one line at a time.
Solver
Solved with line logic: the numbers below were enough, no guess was needed.
How to read nonogram clues
The numbers along the top belong to columns and the numbers down the left belong to rows. Each number is one run of filled cells, and the runs appear in the order they are written. A row labelled “4 2” in a ten-wide grid is four filled cells, at least one empty cell, then two filled cells, with any amount of empty space before the first run and after the last.
A single 0 means the line is empty all the way across, which is information rather than the absence of information: it rules out every cell in that line at once. Two numbers that touch the edges of the grid are the easiest kind of clue, because their position is fixed; a row labelled “10” in a ten-wide grid is simply full.
The sum of the numbers plus the gaps between them is the smallest space the line can occupy. If that total exceeds the width of the grid the clue cannot describe any picture, and the solver says so immediately instead of reporting “no solution” — those are different mistakes, and telling them apart saves a lot of hunting for the typo.
| Cell | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Forced cells: 2 (cells 5 and 6). Everything else stays open until a crossing line decides it.
The overlap rule, with a worked example
Line logic asks a single question of every cell: is there any arrangement of this line’s runs that leaves this cell empty? If the answer is no, the cell is filled. Ask the mirror question — is there any arrangement that fills it? — and if that is no, the cell is empty. Everything else stays unknown.
The overlap rule is the special case everybody learns first. A run of six in a line of ten can start in five positions, so the only cells that are filled in all five placements are the two in the middle. The table above is computed from the line solver itself, cell by cell, so it shows exactly what the engine decides rather than what a rule of thumb predicts.
The general case needs more than overlap. With several runs on one line, the solver enumerates arrangements implicitly: a small dynamic program marks every position-and-run pair that can still be completed, then asks which cells are filled in all surviving arrangements. On a 25-cell line with six runs that is a few hundred states, so a full grid is solved in milliseconds — fast enough to re-run on every keystroke.
Rows and columns take turns. Deductions in a row create new known cells in the columns that cross it, and those columns then force more cells in other rows. The loop continues until a pass changes nothing, which is the point where pure logic runs out.
Why some puzzles have to be guessed
Not every valid nonogram can be finished by line logic. There are puzzles with exactly one solution in which, at some point, no row and no column has a forced cell left; the only way forward is to pick a cell, assume a value, and see whether the assumption contradicts itself. That is not a flaw in the solver — it is a property of the puzzle, and the same puzzle will stop a human at the same place.
This solver handles that case honestly. When line logic stalls it picks the cell whose line has the fewest legal arrangements, tries filled first, propagates, and backtracks on contradiction. Choosing the most constrained line is what keeps the search small: branching on a cell in a line with two possible arrangements is worth far more than branching in a line with four hundred.
The verdict follows from the search. If the first complete grid is found and the search can then prove no second one exists, the puzzle is unique. If a second grid turns up, the puzzle is ambiguous — the solver stops at two because two is enough to prove the point, and shows which cells the two answers disagree on. If every branch leads to a contradiction, there is no solution at all.
Search is bounded by a time budget. A pathological 25 × 25 can take longer than anyone wants to wait, so the solver reports “timeout” rather than freezing the tab. In practice a puzzle published for humans solves in well under a second.
Where the name and the puzzle come from
- Non Ishida, a Japanese graphics editor, won a Tokyo competition in 1987 with grid pictures made from switched-on skyscraper lights; Tetsuya Nishio independently published the same puzzle idea, and in 1988 Ishida published three of them in Japan as “Window Art Puzzles”. The word nonogram comes from “Non” (Ishida’s name) plus “gram” (from diagram), coined by the puzzle collector James Dalgety, who also placed them in The Sunday Telegraph from 1990. Sources: Wikipedia, “Nonogram” (history and naming section).
- Deciding whether a nonogram has a solution is NP-complete — Ueda, N. and Nagao, T. (1996), “NP-completeness results for NONOGRAM via Parsimonious Reductions”, technical report TR96-0008, Department of Computer Science, Tokyo Institute of Technology, as cited in the same Wikipedia article. This site’s solver stops after two solutions and a time budget, which is why it can answer “is there more than one?” quickly even though the general problem is hard.
Frequently asked questions
Can the solver read the numbers straight off a screenshot?
No, and it will not pretend to. Type the clues into the fields — one line per row or column, spaces or commas between numbers — and the solver takes it from there. Reading digits out of a photo is a different problem with a much worse failure rate.
What is the difference between “no solution” and “bad clue”?
A bad clue is impossible on its own: a row of 9 in an 8-wide grid, or a column whose runs plus gaps need more cells than the grid has height. The solver reports the exact row or column. “No solution” means every individual clue is possible but they contradict each other, so no grid can satisfy them all.
Why does the step view stop before the puzzle is finished?
Because the steps are the deductions that follow from line logic alone. When the steps run out, the remaining cells need a guess, and a guess is not a deduction. Press Solve to let the backtracking search finish the grid.
How big a puzzle can it handle?
The grid is capped at 25 × 25, which matches the maker and keeps the page responsive on a phone. Larger nonograms solve the same way but the search can grow quickly, and a browser tab is the wrong place to find that out.
Other tools on this site
Every count on this page — the clues, the number of filled cells, the overlap table — was computed from the grid by this site’s own engine at build time. The grid is yours to share, print or solve; nothing about it leaves your browser unless you paste the link somewhere.