Slide Puzzle Solver

Sliding Puzzle Solver, Step by Step

Solve your board, then walk through it one move at a time.

Click a cell and type its number. Use arrows to focus, Backspace to clear, Enter to solve. Separate two-digit tiles with a space.

Solvable

Inversions: 0 (counting out-of-order nonblank pairs); an even count is required for an odd-width board.

Replay solution

Step 0 of 0: initial board

This sliding puzzle solver step by step mode is for following a solution on a real puzzle or in a game. Enter your board above and press Solve. You get the full move list plus a replay you can step through one move at a time, forward and back.

A worked example, move by move

Here is how a step-by-step solution reads. The 3x3 board below is solved in the fewest possible moves, with a diagram after every move so you can check each position as you go.

12 moves · Shortest solution

  1. Step 0: Initial board

    35612478
  2. Step 1: Move 5 down

    36152478
  3. Step 2: Move 3 right

    36152478
  4. Step 3: Move 1 up

    13652478
  5. Step 4: Move 4 up

    13645278
  6. Step 5: Move 7 left

    13645278
  7. Step 6: Move 5 down

    13642758
  8. Step 7: Move 2 left

    13642758
  9. Step 8: Move 6 down

    13426758
  10. Step 9: Move 3 right

    13426758
  11. Step 10: Move 2 up

    12346758
  12. Step 11: Move 5 up

    12345678
  13. Step 12: Move 8 left

    12345678

How to read a step-by-step sliding puzzle solution

Each line names one tile and the direction to slide it. “Move 6 left” means: take tile 6 and slide it one square to the left, into the empty square. The direction is always the way the tile travels, which is what you see when you look at your puzzle.

Next to the full list you’ll find a compact version of the same solution, written with the letters U, D, L and R. These describe the blank instead of the tiles. Since the blank and the tile swap places, the blank always moves the opposite way: “Move 6 left” is R (the blank moves right), and “Move 3 down” is U (the blank moves up). The compact line is short enough to copy with one click and paste into a note, which is useful for long 4x4 or 5x5 solutions.

Moves are numbered and grouped in tens. The groups don’t change anything about the solution; they just give you natural places to pause.

Tips for following a long solution

Work one group at a time. Make ten moves, then compare your puzzle with the replay board. If they match, carry on. If they don’t, the slip happened within those ten moves, so you only need to look back a short way.

Let the replay keep your place. Press next after each move you make on your puzzle, and the current step stays highlighted in the list. Autoplay runs through the solution at 0.5x, 1x or 2x speed, which is a good way to preview a section before you play it.

Step back instead of guessing. If your puzzle stops matching, use the previous button until the replay board looks like yours again, and continue from there. Guessing usually makes things worse, because every later move depends on the earlier ones.

For an 8-puzzle, the 3x3 sliding puzzle solver gives the same step-by-step view with the shortest solution. For any other board, use the main sliding puzzle solver. And if you’d like to stop relying on a list of moves altogether, how to solve a sliding puzzle teaches the method for doing it yourself.

Frequently asked questions

Does "Move 6 left" mean the tile or the blank moves left?

The tile. "Move 6 left" means you slide tile 6 one square to the left, into the empty square next to it. The blank ends up where tile 6 used to be, one square to the right. Every move in the list names a tile and the direction that tile travels, so you can read it straight off your puzzle.

What do U, D, L and R mean?

They are the compact notation, and they describe the blank square: U is up, D is down, L is left and R is right. The blank always moves opposite to the tile, so "Move 6 left" is written as R. The compact line is handy for copying a long solution into a note or a message.

Can I go back a step if I make a mistake?

Yes. The previous button steps the replay back one move at a time, and the list highlights the step you're on. Go back until the diagram matches your puzzle, then carry on from there. If your board has drifted too far, you can also enter its current state as a new board and solve it again.