Random Puzzle Generator
Generate a solvable sliding puzzle by walking legal blank moves from the solved board, with an integer seed.
Shuffled by legal moves only
The page starts from the solved board — 1 to n−1 reading left to right, then the blank — and makes a fixed number of swaps between the blank and one of its neighbours. Every step is a legal move, so the resulting board is always solvable; a plain shuffle would produce an unsolvable board about half the time on a 3×3 grid.
Size is 3 or 4, moves must be a whole number from 10 to 400, and the seed must be a whole number from 0 to 4294967295. The page does not count the shortest solution, does not check how hard the board is, and does not stop a run from ending near the solved state: 10 moves can leave a nearly finished puzzle.
The blank is printed as an underscore and the numbered tiles as digits, one row per line. Every choice comes from one 32-bit mulberry32 stream, so the same size, move count and seed always print the same board. Nothing is uploaded.
Builds a sliding puzzle from the solved board by making legal blank swaps, so the printed board is always solvable.
It does not measure difficulty and does not guarantee the board is far from solved — a short walk can end almost finished.
How to use it
Choose a 3×3 or 4×4 board, set the shuffle moves (10 to 400) and a seed, then press Run. The blank prints as an underscore.
Each move picks one of the blank's in-bounds neighbours at random and swaps. That is slower to look random than a plain shuffle, but it is the property that makes the puzzle playable.
What to Expect
Best for
- a daily sliding puzzle
- a test board for a solver
- a printable puzzle
What this tool keeps
- a board that is solvable by construction
- the move count used to shuffle
- the seed for a redraw
Frequently asked questions
How do I use the random puzzle generator?
Pick a board size, set the number of shuffle moves and a seed, then press Run. Tiles print as digits with an underscore for the blank.
Is anything uploaded or stored when I press Run?
No. The draw happens in this tab with JavaScript: no request leaves the page, nothing is stored and a reload clears the form.
What are the limits and bounds?
The size must be 3 or 4, the move count a whole number from 10 to 400, and the seed a whole number from 0 to 4294967295; a move count outside the range is refused.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.