Nonogram Lab

PICTURE LOGIC / NONOGRAM LAB

Nonogram Solver

Type the row and column clues of any nonogram — from a book, an app or a newspaper — and get the solution, or one deduction at a time with the reason. The solver also tells you when clues have no solution or more than one.

  • Up to 40 × 40
  • Step-by-step reasons
  • Detects two solutions
  • Runs in your browser
How it works ↓Choose a puzzle, fill the clues, reveal the picture.

How to enter the clues

  1. Row clues go in the left box, top row first, one row per line. Separate the numbers with spaces: 2 1 3.
  2. Column clues go in the right box, left column first, one column per line, reading each column's numbers from top to bottom.
  3. Write 0 for a row or column with no filled cells. The grid size is the number of lines in each box.
  4. Press Solve for the whole answer or Next step to see one row or column at a time.

Before solving, the clues are checked: every row clue has to fit the grid width, every column clue the height, and the row clues must add up to the same number of filled cells as the column clues. In our test on the ten 10 × 10 picture puzzles, every one of 596 off-by-one typing mistakes was caught by these two checks before the solver even started (the full mistake test).

What the result means

ResultWhat it tells you
Solved by line logic aloneOne solution, and a person can reach it one row or column at a time. Next step replays the deductions.
One solution, but line logic stopsStill a fair puzzle with one answer, but somewhere you need to assume a cell and follow the consequences until something breaks. Outlined cells were found that way.
More than one solutionThe clues fit at least two grids. One is shown and the cells that differ are outlined. If the puzzle came from a book or app, a clue was probably copied wrongly.
No solutionNo grid fits all clues. Two clues swapped or a number in the wrong order are the usual causes.

How the solver works

For each row and column, it considers every way the clue's blocks can be placed among the cells already known and keeps the cells that are the same in all of them — filled in all of them, or empty in all of them. That is the overlap method from the rules guide, applied exhaustively. It repeats this across rows and columns until nothing changes. If the grid is complete, the puzzle is "line solvable". If not, the solver picks an unknown cell, tries it filled and empty, and runs line logic after each try; a try that leads to a line that can no longer fit its clue is ruled out. It keeps searching until it has found two solutions or proved there is only one.

Next step shows the line-logic part one line at a time: which row or column, its clue, and which cells it settles. That is the same reasoning a person uses, so it works as a teacher as well as a cheat. The guide when line logic is not enough shows the trial step on a real 5 × 5 example, and how often puzzles need it.

Why typed clues instead of a photo

Solvers that read a screenshot have to recognise every small number correctly. A 15 × 15 puzzle has around 120 clue numbers (4 per line on average in our measurements), and one misread digit changes the puzzle. Typing takes a couple of minutes, and the checks above catch most slips immediately. For puzzles in an app, check the app's own rules first: some apps do not allow outside help in timed or ranked modes.

Examples to try

Made your own puzzle? The nonogram maker checks it while you draw. Want to solve one yourself? Play nonograms online or try the daily nonogram.

Questions

How do I solve a nonogram with this solver?

Type the row clues top to bottom in the left box and the column clues left to right in the right box, one line each, numbers separated by spaces. Press Solve for the answer or Next step for one deduction at a time.

Does it work for Picross, Griddlers and Hanjie?

Yes. They are the same black-and-white puzzle under different names. Colour nonograms are not supported yet.

How big can the puzzle be?

Up to 40 × 40, and the grid does not have to be square.

Why does it say the clues have more than one solution?

Some clue sets fit two or more grids. In a published puzzle that usually means a number was typed wrongly; in your own puzzle, change a cell near the outlined area.

Is anything uploaded?

No. The solver runs entirely in your browser; the clues are only in the page and, if you copy it, in the link.

Can I get a hint instead of the whole answer?

Yes. Press Next step: it settles one row or column and says which cells must be filled or empty and why.

More from Nonogram Lab