3x3 Sliding Puzzle Solver

Enter your 3x3 puzzle and get the shortest possible solution in under a second.

Example board
Mixed up. 8 tiles out of place.0 moves · 0.0 s

Solve your 3x3 slide puzzle

This page is a 3x3 sliding puzzle solver. It opens on a 3x3 board, ready to go. Press Edit start, tap two tiles to swap them until the board matches yours, or type the numbers row by row (0 for the gap). Then press Solve. You'll get the shortest solution for your exact position and can play it as an animation or step through it move by move. It is the 3x3 version of our sliding puzzle solver, which handles every size up to 8x8.

How hard is a 3x3 puzzle?

The 3x3 slide puzzle, also called the 8-puzzle, has 8 numbered tiles and one empty space. Those tiles can be arranged in 362,880 ways, but only half of them, 181,440 positions, can actually be solved. That is small enough for a computer to know the exact distance of every single position from the goal. That's why the solver can promise the shortest solution every time.

  • Most moves ever needed: 31 single-tile moves (only two positions need that many)
  • Typical scramble: about 22 moves
  • Solving time: a few milliseconds

If your hand solution took 60 or 80 moves, don't worry. The fewest-move path is very hard for a person to find, which is exactly what the solver is for.

Is my 3x3 puzzle solvable?

For a 3x3 board there is a simple test. Read the tiles row by row, ignore the empty space, and count the inversions, every pair where a bigger number comes before a smaller one. If the count is even, the puzzle is solvable. If it's odd, it isn't. The solver does this for you the moment you finish entering the board. If the count is odd, it shows a warning and a Fix it button that swaps two neighboring tiles.

Tips for solving a 3x3 by hand

  1. Put tiles 1, 2 and 3 in the top row. Tile 3 is the tricky one. Bring it below its spot first, then rotate it in.
  2. Solve the left column: tiles 4 and 7, as a pair.
  3. Cycle the last four tiles (5, 6, 8) around the remaining 2x2 square until they click into place.

Stuck halfway? Enter your current position and let the solver show you the rest.

Frequently asked questions

What is the maximum number of moves for a 3x3 sliding puzzle?

31 single-tile moves. Every solvable 3x3 position can be finished in 31 moves or fewer, and only two positions need all 31. A typical scramble takes about 22 moves.

Is the solution really the shortest?

Yes. For 3x3 boards the solver measures the exact distance of every one of the 181,440 solvable positions, so the move list it gives you can't be beaten.