This sliding puzzle solver takes the board you’re stuck on and gives you every move to finish it. Enter the tiles, press Solve, and follow the list or the replay on your own puzzle.
How this sliding puzzle solver works
There are three ways to enter a board. Tap a square and type its number (arrow keys move between squares). Paste the numbers as text, row by row, such as 1 2 3 / 4 5 6 / 7 0 8, where 0 or _ marks the blank. Or upload a screenshot or photo: the image is read in your browser, and you check the detected board and fix any tile before solving.
Each board size uses its own search:
- 3x3: A* search, which always finds the shortest solution.
- 4x4: IDA* with a pattern database, also shortest. In the rare case it runs out of time, you get a complete solution that is clearly labelled as not the shortest.
- 5x5: solved layer by layer, which is complete and correct but not guaranteed shortest.
“Shortest” means the fewest single-tile moves. The answer comes as a numbered list such as “Move 6 left”, grouped in tens, plus a compact U/D/L/R line you can copy and a replay with previous, next and autoplay.
Is my sliding puzzle solvable?
Exactly half of all arrangements can never be solved, no matter how you slide the tiles. You can tell which half a board is in by counting inversions: read the tiles left to right, top to bottom, skipping the blank, and count every pair where a larger number comes before a smaller one.
On a board with an odd width (3x3 or 5x5), an even count means solvable. On a 4x4, add the blank’s row counted from the bottom (the bottom row is 1); the board is solvable only if that total is odd.
The solver runs this check before searching. If the board is impossible, it shows the count and suggests two tiles to swap, since swapping any two tiles other than the blank flips the result. There is a full walkthrough on the unsolvable sliding puzzle page.
Works with slide, tile and picture puzzles
Whatever your game calls it, this is the same puzzle: a square frame, numbered or picture pieces and one empty square. That makes this tool a slide puzzle solver, a tile puzzle solver and a sliding tile puzzle solver all at once, for 3x3, 4x4 and 5x5 boards.
It also works as a sliding picture puzzle solver. In Picture mode you upload the scrambled puzzle and the original image, and the tool works out where each piece belongs. The sliding block puzzle solver page explains picture mode in more detail, and which puzzles are not supported: Klotski, Rush Hour and other puzzles with blocks of different sizes.
If you’d rather learn the method yourself, read how to solve a sliding puzzle. To follow a solution on a real puzzle one move at a time, with a diagram for every move, use the sliding puzzle solver step by step.