Number Path Puzzle Generator
Fill the grid with every number from 1 up to the number of squares, using each once, so that each number sits directly next to the one before it — above, below, left or right, never diagonally. The finished grid is one long snake that visits every square. Some numbers are printed to start you off, the first and the last always among them, and every grid here is checked to have one completion and no other.
What this generator does
Lays a scrambled path through every square, numbers it in order, then takes numbers away one at a time — keeping a removal only while a single completion survives.
How to use this tool
- Choose a grid size and how many numbers you would like printed.
- Print or copy the grid; the given numbers are the ones already in place.
- Start at the 1 and work along, or work backwards from a printed number — both are fair game.
- Remember that consecutive numbers must touch edge to edge; a diagonal step is not a step.
- Show the answer to check the finished path.
Understanding the controls
- Grid
- Five to ten squares a side. A ten-by-ten runs from 1 to 100, which is a long sitting rather than a harder one.
- Numbers shown
- How many numbers are printed. Gentle leaves about half of them, standard about a third and stern about a fifth. A fifth is the floor for a measured reason: below it the puzzle stops being anchored and takes seconds rather than milliseconds to prove.
- Seed (optional)
- Type anything to rebuild the same puzzle later, which is how you reprint a page you have lost. Deterministic, not cryptographic.
Common use cases
- A logic puzzle for someone who likes counting more than arithmetic
- Classroom practice with number order and adjacency
- A printable page for a puzzle book, a newsletter or a care home activity sheet
- A gentler daily puzzle than sudoku that still has exactly one answer
- Reprinting the identical grid later from its seed
How this generator works
The path is built rather than searched for. A snake laid row by row already visits every square once; taking one end, joining it to a neighbouring square and reversing the section that would otherwise double back gives another path that does the same, so a few thousand of those moves scramble it thoroughly and cannot fail. Numbers are then removed one at a time, each removal kept only while the printed numbers still lead to a single completion. The check that proves it walks from the 1 upwards, and it is bounded by the arithmetic of the grid: between two printed numbers the plain distance must be no greater than the gap and of the same parity, since every step changes a square from light to dark on an imaginary chessboard.
Randomness and fairness
The path and the order the numbers are taken away in come from your browser's cryptographic random source unless you give a seed — a seeded puzzle is deterministic, not cryptographic.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Only edge-to-edge steps count; the diagonal variant that some papers print is a different puzzle.
- The first and last numbers are always printed, which is the usual published form.
- Difficulty is not graded. A path with one answer may be forced from the first given number, or may need the far end worked backwards first — nothing here tells you which.
- The stern setting keeps about a fifth of the numbers rather than the bare minimum.
Privacy and your data
The path is laid and checked entirely in your browser. Nothing you type as a seed, and no puzzle made from it, leaves the device.
Related generators
- Suguru Puzzle GeneratorPrints a Suguru — also called Tectonic — where each region holds 1 up to its size and no two equal numbers touch, with exactly one answer.
- Maze GeneratorPrint a maze with exactly one route from start to finish — three textures from long corridors to short dead ends, any size up to 40 by 40.
- Slant Puzzle GeneratorPrints a Slant puzzle — one diagonal in every square, numbers counting the ends at each corner, and no closed loop — with exactly one answer.
- Mosaic Puzzle GeneratorPrints a Mosaic, where each number counts the shaded squares in its own block of nine, with exactly one answer.
- Magic Square GeneratorBuilds a genuine magic square of any size — every row, column and diagonal summing to the constant the size forces.