A nonogram looks like a picture puzzle and behaves like an arithmetic one. Every number on the edge of the grid describes a run of filled cells, and every run has to sit somewhere inside a line of fixed length. That makes the puzzle checkable: for each line you can list the placements that still fit, see which cells those placements have in common, and fill or cross out accordingly. This page does that bookkeeping in the browser and writes down what it did.
What a Nonogram Is
A nonogram is a grid with clues along the top and left edge. The clue for a row lists the lengths of the filled runs in that row, in order, from left to right. A clue of 4 8 3 means four filled cells, then at least one empty cell, then eight filled cells, then at least one empty cell, then three. The runs never touch: the gap can be longer than one cell, but it cannot be zero. The same rule applies to the column clues, read from top to bottom.
The numbers do not say where a run begins, which is the whole puzzle. Wikipedia's article on nonograms describes the clues as a form of discrete tomography, because the row and column counts measure the same picture from two directions. That is also why many nonograms can be solved without seeing the picture: Wikipedia notes that they often yield to reasoning through one row or column at a time.
This solver handles black-and-white nonograms only. Wikipedia also describes colored versions, where each number carries a color and two runs of different colors may touch, but supporting them changes the line logic enough to be a separate tool. The presets run from 5 × 5 to 25 × 25, custom sizes reach 30 × 30, and width and height are set separately, so the grid does not have to be square.
What This Solver Does
There are three layers, and it helps to know which one produced an answer.
Line analysis. For a single row or column, the solver considers every arrangement of the clue that fits the cells already decided in that line. It then intersects those arrangements. A cell that is filled in every arrangement must be filled; a cell that is empty in every arrangement must be empty; a cell that varies is left undecided. The count of arrangements is computed rather than estimated; at a billion or more it is reported as at least a billion.
Propagation. A row deduction changes the column clues that cross it, so the solver repeats the analysis for every row and every column until a full pass changes nothing. On many puzzles this alone finishes the grid, and the step log then contains the complete proof.
Search. If propagation stalls, the solver picks an undecided cell, tries both values with propagation applied to each, and recurses. A guess that contradicts a line is discarded immediately, so the search only explores branches that survive line checking. It stops at 60,000 nodes or two seconds, whichever comes first.
None of this requires a server. The whole engine is a script on the page, and your clues never leave the browser.
How to Enter the Clues
- Pick the size. The presets are 5 × 5, 10 × 10, 15 × 15, 20 × 20 and 25 × 25. Custom accepts any width and height from 2 to 30, so a 20 × 15 newspaper puzzle is fine.
- Type the row clues. One line per row, starting with the top row. Separate the numbers in a line with spaces or commas.
- Type the column clues. One line per column, starting with the leftmost column.
- Leave a line empty when the answer is empty. A row with no filled cells gets a blank line, not a zero. If you type a zero it is ignored, but a blank line is clearer.
- Choose Solve. The grid appears below the controls, followed by the step log.
The line count is checked before solving. A 10 × 10 puzzle needs exactly ten row lines and ten column lines, and a mismatch is reported with the number of lines found. Numbers are checked too: a run longer than its line, or a clue whose runs and gaps cannot fit, is rejected with the arithmetic shown. For example, a row clue of 3 3 in a 5-cell row needs 3 + 1 + 3 = 7 cells and is reported as impossible rather than silently solved.
If both clue boxes are empty, the solver treats the puzzle as a grid with no filled cells. That sounds trivial, and it is, but it is also the correct reading of an empty puzzle and it keeps the tool from throwing an error at an untouched form.
Paint Mode: Deriving Clues from a Picture
Switch the clue source to Paint the picture and the grid becomes the input. Click cells to fill them, Shift+click to mark a cell as empty, and the row and column clues are generated from the painting as you go. The two clue boxes become read-only while this mode is active, because the painting is now the source of truth.
This mode exists for a specific job: checking your own transcription. If you are solving a puzzle on paper and want to confirm that you copied the clues correctly, paint the picture you have so far and compare the derived clues with the printed ones. It is also a quick way to test a puzzle you are designing, because you can see immediately whether the clues you drew describe the picture you meant.
One honest limitation follows from the design. A painting always produces clues that fit that painting, so the solver will never call your own drawing unsatisfiable. What it can tell you is whether the clues you derived allow a second picture. If the answer comes back as multiple solutions, the drawing is under-determined and would make a poor puzzle.
How the Line Solver Reasons
Take the simplest useful case. A row has ten cells and a single clue of 8. The run can start in cell 1, cell 2 or cell 3, and nowhere else, because eight filled cells need eight consecutive positions. Start in cell 1 and the run covers cells 1 to 8. Start in cell 2 and it covers 2 to 9. Start in cell 3 and it covers 3 to 10. Cells 3 through 8 are covered by all three placements, so they must be filled. Cells 1 and 2 are filled in only some placements, so they stay undecided. This is the overlap argument that Wikipedia calls the simple boxes technique, and it is the mental version of what the code does with every line.
Now add a second clue: 4 3 in ten cells. The two runs plus the mandatory gap need eight cells, leaving two cells of slack. The first run can slide, but not freely: in every placement it covers cells 3 and 4, and the second run always covers cell 8. The solver finds the same result by counting arrangements, and the log reports it as a set of cells that all remaining arrangements agree on. The difference is that the code does not need an overlap shortcut. It can handle clues like 2 1 3 1 where the overlap argument is awkward to apply by hand.
The count in the log is worth reading carefully. "Six arrangements fit" means six placements of the full clue remain possible given the cells already fixed in that line. It is not the number of solutions to the puzzle. When the count falls to one, the line is decided and every undecided cell in it can be filled or crossed out. A wrong assumption usually shows up as a line with no arrangements at all, and the search uses exactly that signal.
One number needs a warning attached. A line can have two remaining arrangements and the puzzle can still have a single solution, because the choice in that line is settled by a crossing column later. The count describes uncertainty inside one line, not uncertainty in the puzzle. If you read the log expecting the counts to fall to one everywhere, a perfectly solvable puzzle will look worse than it is.
Single-line analysis is cheap. The dynamic program behind it is quadratic in the line length at worst, which is the same bound Wikipedia reports for a published line solver. That is why a 30 × 30 grid can be propagated many times without the page becoming unresponsive.
A worked chain
The 5 × 5 diamond in the example button shows how a deduction travels. The middle row has the clue 5 in a line of five, so the only arrangement fills all five cells. That single fact changes every column. Column 1 now contains one filled cell in its middle position and a clue of 1, so the run is pinned: the middle cell stays filled and the other four become empty. Column 2 receives the same treatment with a clue of 3, and its run is anchored around the middle. Three of the five columns are decided before the second pass is over, and the two remaining rows follow from them. None of this needed a guess, and the log records each step in the order it happened.
That order is also a debugging aid. If the log stops after two entries and the grid is nearly empty, the clues are weak rather than the solver being slow. If it fills a cell you believe is empty, the first entry to check is the line named in the message: the deduction is only as good as the clue you typed into that line.
When Logic Stalls: What the Search Does
Not every puzzle yields to line reasoning alone. Some require a guess, and the difference between a good solver and a stubborn one is what happens next.
When propagation stops with cells still undecided, the solver chooses the undecided cell that sits at the crossing of the two most constrained lines. It then tests both values. Each test is followed by a full propagation pass, so a bad guess usually collapses in a few lines rather than dozens of steps later. If both values survive, the branch that leaves fewer cells open is explored first. If one value contradicts a clue, the other value is forced, and the log records that as a contradiction rather than as a guess.
This is the same probing idea that Wikipedia describes under advanced solving techniques: assume a value, propagate, and if a contradiction appears, the opposite value is certain. The search is a systematic version of that idea, with a budget.
The budget matters because nonogram solving is hard in the worst case. Deciding whether a nonogram has a solution at all is NP-complete, according to Wikipedia's summary of the complexity results. That does not mean every puzzle is slow; it means no solver can promise a fast answer on every input. A page that claims otherwise is either restricting the puzzles it accepts or hiding the cases where it fails. This one stops and says so.
The Four Outcomes, and Why They Are Reported Honestly
After a run, the solver reports one of four states. The wording is deliberate, because the difference between "solved" and "one solution found" matters.
- Solved, unique. Either propagation decided every cell, or the search exhausted the remaining possibilities and found exactly one solution. Both are proofs of uniqueness.
- Multiple solutions. The search found more than one complete grid, or hit the cap of five. The grid shown is the first solution found, and the message says how many were counted. It is not presented as the answer.
- Unsatisfiable. Some line has no arrangement consistent with the cells already fixed, so no grid can satisfy all the clues. The message names the first line that failed.
- Budget reached. The search ran out of nodes or time before it could decide. If it found one solution, it says so and says that uniqueness was not proven. If it found none, it says the puzzle needs more guessing than the budget allows.
The fourth state is the one most tools hide. It is better to report a limit than to print a grid that happens to satisfy the rows and ignore a column, which is the failure mode that makes a solver unreliable for checking homework.
Reading the Step Log
Every deduction is logged with the line, the clue, the number of arrangements that remained, and the cells that were decided. Here is a real log from the 5 × 5 diamond in the example button, trimmed to the first four entries:
Row 2 (clue 3, line of 5): 3 arrangements fit the cells already fixed, and every one of them agrees on these cells. New deductions: fill 3. Row 3 (clue 5, line of 5): only one arrangement fits the cells already fixed, so the whole line is decided. New deductions: fill 1-5. Row 4 (clue 3, line of 5): 3 arrangements fit the cells already fixed, and every one of them agrees on these cells. New deductions: fill 3. Column 1 (clue 1, line of 5): only one arrangement fits the cells already fixed, so the whole line is decided. New deductions: empty 1-2, 4-5.
The first entry says that with nothing decided yet, three placements of a run of 3 fit in a line of five, and all three cover the middle cell. That is the overlap argument in miniature. The fourth entry is a column that has become fully constrained after the row pass, so its remaining cells are crossed out in one go.
The log lists the first 25 entries and offers a control to show the rest. It is capped at 500 entries, with a note when deductions were left out. Search steps are logged separately and are labeled as guesses, so a reader can tell a proof from a branch. No step is invented after the fact: each line is written at the moment the corresponding line analysis returns.
Solving Nonograms by Hand
The tool is fast, but the technique is worth learning, because many puzzles can be finished without guessing. Three habits cover a large share of them.
1. Use the slack, not the clue
Add the runs and the gaps between them, then subtract from the line length. A row of 15 with the clue 6 2 3 needs 6 + 1 + 2 + 1 + 3 = 13 cells, leaving two cells of slack. Any run longer than the slack has cells that cannot move: the 6 contributes 6 − 2 = 4 forced cells, and the 3 contributes one. Wikipedia's mathematical approach section sets out the same arithmetic. It is a fast first pass over a new puzzle, and it works on rows and columns independently.
2. Read the edges
A filled cell near an edge narrows the placements of the clue that reaches it. With a clue of 5 in a ten-cell row and a filled cell already sitting in cell 3, the run can start at cell 1, 2 or 3, and all three placements cover cells 3, 4 and 5. Those three cells are forced even though the run's exact position is not yet known. The same reasoning applies from the other end of the line, and it is one way into a puzzle that has no overlap at all.
3. Mark what is empty
A completed run is surrounded by empty cells, and those empty cells are deductions too. Crossing them out prevents you from reusing a cell and often forces the next run. The solver marks empties explicitly for the same reason: a line with its gaps filled in is much easier to analyze than a line with unknown cells everywhere.
When those three stall, the next step is a contradiction test. Pick an undecided cell, assume it is filled, and propagate by hand until something breaks. If nothing breaks, the assumption may still be wrong, so the test only proves a value when it fails. That asymmetry is why guessing is a last resort rather than a strategy.
Why Clues Sometimes Cannot Fit
Two different failures get reported as impossible, and they are worth separating.
The first is arithmetic inside one line. The runs and their mandatory gaps are longer than the line. A clue of 5 5 in a row of nine needs 5 + 1 + 5 = 11 cells, so no arrangement exists. This is caught before any solving starts, and the message shows the sum.
The second is a contradiction between lines. Each clue fits its own line, but the row requirements force a pattern that a column clue forbids. The solver detects this during propagation and names the first line that cannot be satisfied. In a hand-solved puzzle the same thing happens when a copied clue has one digit wrong: every line looks reasonable on its own, and the grid becomes impossible a few passes later.
If you are checking a transcription, that distinction is useful. An arithmetic error usually means a digit was misread. A contradiction that appears only after propagation usually means a digit was copied into the wrong line.
Grid Sizes, Speed and Limits
The presets cover the common sizes, and the custom fields handle anything else up to 30 × 30. The engine is the same at every size; what changes is how much work the search may have to do.
In testing the same engine outside the browser, a 15 × 15 picture finished in tens of milliseconds, and a 25 × 25 picture with strong clues finished in a few hundred milliseconds. Puzzles with weak clues are a different matter: a symmetric 25 × 25 pattern with very few forced cells used the full two-second budget without settling. That is a property of the puzzle, not a bug in the page, and the solver reports it rather than freezing.
Two limits are worth stating plainly. The page does not read photographs or screenshots, so there is no OCR and no image upload. And it does not know which puzzle you meant: if two grids satisfy the clues, it will show you one and tell you there are others, but it cannot choose the picture the designer had in mind.
Multiple Solutions and Puzzle Design
Clues are generated from a picture, but the relationship does not run backwards reliably. Jan Wolter's survey of paint-by-number solvers makes the point in its discussion of validation: designers draw an image and derive the clues, and not every image produces a good puzzle, because some clues admit more than one solution. A program that only finds one answer can stop as soon as it succeeds. A validator has to keep looking for a second, which is a harder job and a different design.
That is the reason this page counts solutions up to a cap instead of returning the first grid it finds. If you are building a puzzle, a multiple-solution report tells you to add or change clues. If you are solving one, it tells you that the grid in front of you is one valid reading and not necessarily the intended picture. Both are more useful than a confident single answer.
Names and a Short History
The puzzle has more names than most: hanjie, griddlers, paint by numbers and picture logic all describe the same grid, and Wikipedia lists them together. The names traveled with the magazines that printed them. Wikipedia's history section records the commonly cited origin: Non Ishida, a Japanese graphics editor, won a competition in Tokyo in 1987 with grid pictures made from skyscraper lights switched on and off, and turned the idea into a puzzle. Tetsuya Nishio independently invented a similar puzzle and published it in another magazine.
Ishida published three puzzles in Japan in 1988 under the name Window Art Puzzles. A British puzzle collector, James Dalgety, saw them and helped place them with The Sunday Telegraph, which began running them weekly in 1990. Dalgety is credited with the name nonogram, a blend of Non from Ishida's name and gram from diagram. In 1998 the newspaper ran a competition to rename the puzzles, and Griddlers was the readers' choice.
Electronic versions existed by 1995 on handheld toys and on the Game Boy, according to Wikipedia's section on electronic puzzles. That Game Boy release came with timers, hints and penalties for mistakes, and those features are worth avoiding if you want to learn the logic: a timer rewards guessing, and a hint that reveals a row removes the deduction you were supposed to make.
Common Mistakes
- Reading the clue as a count instead of a sequence. The numbers are ordered runs, not a total. A clue of
1 3is not four filled cells; it is one cell, a gap, then three. - Forgetting the mandatory gap. Runs cannot touch, so the gap consumes a cell from the line length. Leave it out and the clue looks shorter than it is, which is how a line ends up rejected as impossible.
- Treating a filled cell as a finished run. A cell at the edge of a run may extend further. Only the clue count and the available space decide where a run ends.
- Guessing too early. A guess that works for twenty cells can still be wrong. Line reasoning is not slower in the long run, because it does not have to be undone.
- Ignoring the columns. Reading only the rows leaves half the constraints unchecked, and the grid can stall with nothing left to deduce. Every row deduction should be read as a column constraint too.
- Assuming one answer. If the clues are ambiguous, the picture you had in mind may not be the only grid that fits. The multiple-solution report is information, not a failure.
What This Page Does Not Claim
It does not claim that every puzzle can be solved instantly. It does not claim that a solved grid is the picture the designer intended, only that it satisfies every clue. It does not read images, and it does not store puzzles between visits. It also does not use a word list or a dictionary, because a nonogram has no words in it; the entire input is the clue numbers and the grid.
What it does claim is narrower and testable. The line analysis is exact for the clues you enter. Every logged deduction follows from the arrangements that remained at that moment. The outcomes are reported as found, including the case where the search runs out of budget. And the whole thing runs locally, so a puzzle you are stuck on does not need to be sent anywhere to get an answer.
Related Puzzles and Solvers
If you want to play rather than solve, the nonogram game generates picture puzzles at several sizes. For other grid logic, the Sudoku solver explains its placements step by step in the same spirit, and Killer Sudoku adds cage arithmetic to the grid. Jigsaw Sudoku changes the region shapes instead. The full collection sits under logic puzzles, and the word games section covers the letter-based side of the site.
Nonogram Solver FAQ
How does a nonogram solver work?
For every row and column it works out which arrangements of filled cells agree with the clue and the cells already decided. A cell that is filled in all of those arrangements is filled; a cell that is empty in all of them is marked empty. It repeats that pass in both directions until nothing changes, then searches only if the grid is still undecided.
Why does my puzzle have more than one solution?
The clues constrain the picture but do not always pin it down. A puzzle built from a drawing can still admit a second arrangement that satisfies every row and column. The solver counts solutions up to a cap of five and reports how many it found, rather than presenting the first answer as the only one.
What does it mean when the solver says the puzzle needs guessing?
It means line reasoning stalled and the backtracking search reached its limit of 60,000 nodes or two seconds without proving an answer. The clues may still be solvable, but not within the work budget this page allows.
Can I enter clues with commas instead of spaces?
Yes. Both 4 8 3 and 4, 8, 3 are read the same way. Put one line per row in the row box and one line per column in the column box. Leaving a line empty means that row or column has no filled cells.
Does the solver work on a phone?
Yes. The page runs in the browser, the grid resizes, and every control is reachable by keyboard or touch. There is no app to install and no account to create.
Is the picture I type or paint sent anywhere?
No. The clues and the grid stay in the page. Solving is done by JavaScript already loaded in the browser, so pressing Solve sends no request with your puzzle.
What is the largest grid the solver accepts?
Thirty cells in either direction, with preset sizes for 5, 10, 15, 20 and 25. Line analysis stays fast at that size; the limit on hard puzzles is the search budget, not the grid dimensions.