Strategy guide

How to solve a nonogram

A nonogram, also sold as griddlers, hanjie, paint-by-numbers or Japanese crossword puzzles, is solved one line at a time: each row and column clue lists the runs of filled cells in that line, in order, with at least one empty cell between runs. Every board on this site can be finished that way without guessing. The diagrams below are real lines from our unlimited boards, at the moment each technique applies.

Start with what the empty grid already decides

Before a single cell is filled, some lines already give cells away: a clue that is long for its line settles cells on its own. Scan every row and column for these first. Each one you mark gives the crossing lines a foothold.

6792 41 33 14 2976233443433333343443326792 41 33 14 297623344343333334344332
  • decided by this step
On this 10×10 board, 14 of the 20 lines decide something from the empty grid, 36 cells in all (highlighted). The second board is the picture it hides.Position from unlimited board #2

Count the line: when the clue fills it exactly

Add up the runs, plus one empty cell between each pair. If the total equals the length of the line, the runs can sit in only one place, and the whole line is decided, gaps included.

before4 5
after4 5
  • decided by this step
Column 4, clue 4 5: the runs add up to 9, and with 1 gaps that makes 10, the whole line.Position from unlimited board #8

Overlap: push a run to the left, then to the right

Slide a run as far left as it can go, then as far right. If it is longer than half the space it can move in, the two positions overlap, and the overlapping cells are filled in every solution. For a single run of length k in a line of n cells, exactly 2k − n cells are certain whenever 2k is more than n.

The same works with several runs: pack them all to one side, then to the other, and fill the cells where the same run covers both positions.

packed left7
packed right7
after7
  • decided by this step
Row 2: one run of 7 in 10 cells. Packed left and packed right, it covers the same 4 cells, so those are filled.Position from unlimited board #3

Glue a run to the edge

A filled cell near an edge belongs to the first run on that side if it is closer to the edge than that run is long. The run cannot start beyond the edge, so it must reach from that cell out to its full length.

before4 1
after4 1
  • decided by this step
Row 8, clue 4 1: the first known cell from the left edge is filled, at position 3, within reach of the run of 4. The run must cover it and cannot start beyond the edge, so it reaches at least to position 4 from that edge.Position from unlimited board #3

Cross out cells no run can reach

Once some cells are fixed, the runs have less room to move. Any cell that no placement of any run can cover is empty: cross it out. Crosses matter as much as filled cells, because they cut the crossing lines into shorter spaces where overlap works again.

before2 2 2
after2 2 2
  • decided by this step
Row 8, clue 2 2 2: with the cells already known, part of the line is out of every run's reach. New crosses: 1. New filled cells: 1.Position from unlimited board #1

Finish the line: cross out the rest

When a line holds every filled cell its clue asks for, every blank cell left in it is empty. Mark them straight away: those crosses are the facts the crossing lines are waiting for.

before3 3
after3 3
  • decided by this step
Column 5, clue 3 3: all its runs are on the board, so the 4 blank cells become crosses.Position from unlimited board #2

A working order

Work in passes. First, every line the empty grid decides. Then go back and forth between rows and columns, rereading only the lines that gained a cell since you last read them. When nothing moves, look for a filled cell near an edge (glue) and for runs that now have less room (overlap again, with the known cells). On our boards these steps always reach the end: the generator rejects any board that would need a guess or a look-ahead.

Questions

Is a nonogram the same as Picross or griddlers?
The rules are the same. Griddlers, hanjie and paint-by-numbers are other names for the puzzle. Picross is the name Nintendo uses for its nonogram games, and Pic-a-Pix the one Conceptis uses; we are not affiliated with either.
Can a nonogram have more than one solution?
A grid drawn at random can, and some can only be finished by guessing. Every board here is checked to have exactly one picture, reachable by reading one line at a time.
How do you start a 10x10 nonogram?
Look for clues that are long for the line: a total near 10 with its gaps, or a single run of 6 or more. Count and overlap those first, then work the crossing lines.