Sliding puzzle solver
How the solver works
Type in the board as it is on your puzzle, reading row by row, and leave the empty cell blank. The solver checks that every number appears once and that the board can be solved at all. Exactly half of all arrangements can’t be: if yours is one of them, you will see a message instead of a solution.
3×3 (the 8 puzzle): the solver always finds the shortest solution, at once. No 8 puzzle needs more than 31 moves.
4×4 (the 15 puzzle): you get a quick solution straight away, then the solver keeps searching for the shortest one, usually in well under a second. It uses a method called IDA* with pattern databases: tables that say how many moves at least it takes to put each group of five tiles in place. No 15 puzzle needs more than 80 moves; a typical board takes about 50.
5×5 to 7×7: finding the shortest solution is out of reach for a browser, so you get a quick solution built the way a person solves it: the top row, then the left column, then the smaller board that is left.
Step through the solution with the arrows, or press play. The tile with the blue ring is the next one to move. To try the board yourself, choose Play this board. Want to learn to solve it without help? Read how to solve the 15 puzzle.