Puzzle tool

Nonogram solver

Paste the row clues and the column clues, press solve, and get the grid back. It tells you when the clues contradict each other and when they fit more than one picture, which is the usual reason a nonogram feels impossible. Nothing to install, no sign-up, and it runs entirely in your browser.

How to enter the clues

  • One line per row, from the top of the puzzle down. Numbers on a line are that row's blocks, in order, separated by spaces. So a row whose clue reads 3 1 goes in as 3 1.
  • One line per column, from the left across. Same format.
  • An empty row or column — one with no filled cells at all — can be a blank line or a single 0. The example uses 0 so the line count is obvious.
  • The number of lines must match. Ten row lines and ten column lines means a 10 by 10 puzzle. There is nothing else to configure.

What the clues mean

A nonogram is a grid you fill in from the numbers around the edge. Each row's numbers say how many filled cells sit together in that row, in that order, with at least one empty cell between blocks. A row of ten cells with the clue 3 1 has three filled cells, at least one gap, then one more filled cell — nothing else in that row is known from the clue alone.

A 0, or no number at all, means the whole line is empty. A single number equal to the line length means the whole line is filled. Everything between those two extremes is what the solving work is about.

How the solver works

It does the same two things a person does, in a loop. First, for each row and each column it works out every possible placement of that line's blocks that fits what is already known, and marks a cell as filled only when every placement fills it, empty only when no placement fills it. Anything else stays unknown. That is the overlap technique: if eight cells have to hold a block of five somewhere, the middle three are filled no matter where the block lands.

Second, when the lines stop producing anything new but the grid is still incomplete, it picks an unknown cell and tries both values, continuing the same line work down each branch. That is exactly what a stuck human does when they guess, except the solver remembers which branch it is in and will come back and try the other one. If both branches complete a picture, the clues have more than one answer and it says so.

Speed is not a problem at the sizes people actually solve: a 10 by 10 is immediate and a 25 by 25 finished in a few milliseconds in testing. The limit is the browser tab, not the algorithm.

Why it sometimes says "more than one solution"

Because the clues really do fit more than one picture. A nonogram is only a puzzle if its clues have exactly one answer; if two different grids produce the same row and column numbers, then whoever wrote the puzzle left out a number, and no amount of logic can tell you which picture was intended. The solver returns the first grid it finds and tells you the clues are ambiguous — which is more useful than silently returning one of the possibilities.

It also reports the other failure: clues that cannot all be true at once, most often because a row asks for more filled cells than the grid has columns.

What it does not do

There is no photo upload. Reading a nonogram out of a screenshot is a different problem — it needs grid and digit recognition, and it gets the clues wrong often enough to be worse than typing them. Ten lines of numbers take about twenty seconds to type.

Play instead of solving by hand

The nonogram game has puzzles you can fill in with a mouse or a finger, and a daily nonogram that is the same grid for everyone on a given day, with a streak counter. If you want paper, three printable nonograms are ready to print with their answers, and the printables library has word searches, sudoku and mazes.

Questions

Is this a nonogram solver or a picross solver?
Both names mean the same puzzle. Picross, griddlers, paint by numbers and hanjie all use row and column number clues to describe a hidden picture, so the clues go in the same way whatever you call it.
Can it solve a nonogram from a screenshot or a photo?
No. It takes typed clues. Reading the numbers out of an image needs optical character recognition on a grid, and small misreads turn a solvable puzzle into a contradiction, so typing the clues is both faster and more reliable.
Why does it say my clues have no solution?
Usually one number was mistyped, or a row's numbers add up to more filled cells than the grid has columns. The message names the row or column that cannot fit, so start by checking that line against the puzzle.
Does the solver show how it got there, step by step?
Not yet. It shows the finished grid and how long it took. The technique it uses is the one described above — line placement, then a branch when the lines stop helping — so you can reproduce any of its answers by hand.
Is there a size limit?
No fixed limit. Every line's clue set is enumerated as bitmasks, which caps a line at 30 cells, so puzzles wider or taller than 30 need a different build. Anything from 5 by 5 to 25 by 25 is comfortable.
Do the puzzles on this site have one solution?
Yes — the four nonogram puzzles in the game were checked with this solver, and each has exactly one answer, so a grid that looks different from the one the game expects is a mistake rather than an alternative solution.