Nonograms, Explained

Read this and you will understand how a nonogram turns a picture into number clues, why some pictures make good puzzles and others do not, and how to check whether your puzzle can be solved by logic alone.

What a nonogram is

A nonogram is a grid puzzle. You start with a blank grid, and the clues along each row and column tell you where the filled cells go. When you finish, the filled cells form a picture. The puzzle is also sold as picross, griddler and hanjie.

Each clue is a list of numbers. A row clue of 3 1 means: reading left to right, there is a run of 3 filled cells, then at least one gap, then a run of 1 filled cell. The numbers never tell you where the runs start. You deduce that from the other clues.

Take a tiny 5x5 grid holding a plus sign. The center column is fully filled and the center row is fully filled. The column clues, left to right, read 1, 1, 5, 1, 1. The row clues, top to bottom, read the same: 1, 1, 5, 1, 1. From those ten short lists you can rebuild the plus with no guessing. That is the whole idea: a picture compressed into run lengths, and a solver who expands it again.

When to use it, and when not

Nonograms suit a printed worksheet, a puzzle booklet, or an embed on a lesson page. They teach reasoning about constraints, and they reward patience rather than speed. A single 15x15 puzzle occupies most people for 15 to 40 minutes.

They are a poor fit when you want a quick warm-up (a 5x5 takes under two minutes and feels slight) or when the solver has no pencil-and-paper habit, because marking known blanks is half the technique. They also fail when the picture is a poor source. A grid that is nearly empty or nearly full carries little information, and the clues stop pinning down a single answer.

A nonogram is only fair if it has exactly one solution. A picture with several blank rows and blank columns often has two or more solutions, which means a solver who reasons correctly can still be marked wrong. The tool warns about empty rows and columns for this reason.

Counting the possibilities in one line

To see why density matters, count how many ways a single row can be filled. Suppose a row has n cells and a clue with k runs whose lengths sum to s. The runs need k-1 mandatory gaps between them, so the fixed cells total s + (k-1). The free space you can distribute is n - s - (k-1) cells, spread across k+1 slots (before, between, after the runs).

N = \binom{n - s + 1}{k}

Here N is the number of legal placements for that row, n is the row length, s is the total of the clue numbers, and k is how many numbers the clue has. The binomial \binom{a}{b} counts how many ways to choose b gap positions from a options.

Check it on the plus row 5 in a width-5 grid: n = 5, s = 5, k = 1, so N = \binom{1}{1} = 1. One placement. Now a clue of 1 in the same row: n = 5, s = 1, k = 1, giving N = \binom{5}{1} = 5. Five placements. That single filled cell could sit anywhere, and only the column clues resolve it.

A fully filled or fully empty line has N = 1. A half-filled line has the most placements. That peak is exactly where ambiguity hides, which is why balanced pictures with clear edges solve cleanly and noisy half-densities do not.

A single run of length 1 in a 10-cell row has 10 possible positions; a run of length 10 has just 1. Longer runs pin down faster.

A worked example: the demo puzzle

Reproducing the 5x5 plus sign

Load the demo (it uses the field defaults) and draw the plus described above, or read along. The grid is 5 wide, 5 tall. Filled cells: the entire middle column (column 3) and the entire middle row (row 3).

  1. Compute each column clue by scanning top to bottom. Columns 1, 2, 4, 5 each have one filled cell (row 3 only), so their clue is 1. Column 3 is filled top to bottom, clue 5.
  2. Compute each row clue by scanning left to right. Rows 1, 2, 4, 5 each have one filled cell (column 3 only), clue 1. Row 3 is filled across, clue 5.
  3. Now solve it fresh. Column 3 clue 5 forces all five cells filled: N = 1. Row 3 clue 5 forces all five filled the same way.
  4. Row 1 clue 1 has five placements alone, but column clues 1, 2, 4, 5 are all 1, and each of those single cells is already claimed by row 3. So row 1's single filled cell must sit in column 3. Repeat for rows 2, 4, 5.

Every cell is now forced. The solution is unique, and you never guessed. That is the signature of a well-formed nonogram: at each step, one line has a placement count of 1 given what you already know.

In a 10x10 grid, a picture that fills about 30 percent of cells with connected shapes usually solves line by line. As density approaches 50 percent with scattered single cells, the number of ambiguous lines rises sharply, and two or more distinct grids can share the same clues.

How to read and interpret the clues

Two techniques cover most deductions. The first is overlap. If a row has width 10 and a single run of 8, the run can start at cell 1, 2 or 3. In all three positions cells 3 through 8 are filled, so you can fill those six cells immediately. The overlap length is s - (n - s) when there is one run, which here is 8 - 2 = 6.

The second is edge forcing. If cell 1 is already known blank and the leftmost clue is a run of 3, that run cannot touch the left wall, so it slides right. Combined with column deductions, forced blanks cascade. Marking blanks with a small dot or X is not optional: a blank you have proved is as useful as a fill you have proved.

Solve the most constrained lines first. Sort by N: any line with N = 1 is free, and lines with a large s relative to n give big overlaps. Never guess. If nothing is forced, the puzzle is either unfinished by you or genuinely ambiguous.

Common mistakes when building puzzles

The most frequent error is drawing a picture that reads clearly to a human but leaves the grid ambiguous. A face made of four isolated dots (two eyes, two nostrils) gives four rows of 1 and several columns of 1, and those single cells can swap positions without changing any clue. Connect features or add a border to lock them down.

The second error is ignoring the empty-line warning. An empty row contributes clue 0, which tells the solver nothing and often lets neighbouring runs float. A puzzle with three or more empty rows in a 10x10 grid is worth re-checking for a second solution.

The third is over-dense art. A silhouette that fills 70 percent of a 15x15 grid produces long clues that overlap heavily, so the puzzle solves in two minutes and feels flat. Aim for 30 to 45 percent fill with recognizable connected shapes. That range keeps enough lines at low N to give footholds while leaving real work to do.

Related tools

If you like grid logic that guarantees a single answer, the Sudoku Generator builds puzzles with a unique solution at five difficulty levels. Sudoku and nonograms share the same discipline: deduce, never guess, and mark what you have ruled out.

Frequently asked questions

What size grid should a beginner start with?

Start at 10x10. A 5x5 is too small to hide a recognizable image, and a 15x15 or 20x20 can take 30 minutes or more. Ten by ten fits on one printed page and takes most people 8 to 15 minutes.

Does every nonogram have exactly one solution?

No. Only well-formed ones do. Sparse or symmetric pictures often admit two or more grids that share identical clues. Check for empty rows and columns, and connect isolated single cells before publishing.

What does a clue of 0 mean?

An empty line. It has no filled cells at all. Many printings show it as a single 0 or leave the clue box blank. It carries no positional information, so use it sparingly.

Can I solve a nonogram without ever guessing?

For a well-formed puzzle, yes. Every step should follow from overlap or edge forcing. If you reach a point where no cell is forced, the puzzle is ambiguous, not you.

Why does my puzzle solve too fast?

Your picture is probably too dense or too sparse. Long runs create large overlaps that fill many cells at once. Target 30 to 45 percent fill with connected shapes for a puzzle that stays interesting.