Sliding Puzzle Solver

Enter your puzzle, check if it can be solved, and watch the solution step by step.

Optimal solutions for 3x3, 4x4 and 15-puzzle boards; fast solutions for larger boards.

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

How to use the sliding puzzle solver

  1. Set up your board. Pick the size, then press Edit start and tap two tiles to swap them until the board matches your puzzle. You can also type the numbers row by row, using 0 for the empty space.
  2. Press Solve. The solver first checks whether your puzzle can be solved at all. If it can, it builds a solution in a moment.
  3. Follow the moves. Play the solution as an animation, or step through it one move at a time. Each step shows which tile to slide and in which direction (for example 8 ↓), so you can copy the moves on your own puzzle.

Want to try it yourself first? Press Shuffle and play in Play mode. A timer and move counter keep score, and your best times are saved in your browser.

What is a sliding puzzle?

A sliding puzzle is a square frame filled with numbered tiles or picture pieces and one empty space. You slide a tile next to the gap into it, one move at a time, until the tiles are back in order. The same toy goes by many names: slide puzzle, tile puzzle, sliding block puzzle, sliding tiles, the 8-puzzle (3x3) and the 15-puzzle (4x4). Whatever you call it, this page works as a sliding, slide or tile puzzle solver for all of them.

You will find these puzzles as plastic toys, in phone games, inside escape rooms and video games, and as picture puzzles made from photos.

How the solver works

Every time you press Solve, the tool does two things:

  • It checks solvability. A sliding puzzle has a hidden "parity". Every move keeps it the same, so a board with the wrong parity can never reach the goal. The solver computes it instantly and warns you before wasting a single move.
  • It searches for a solution. Small boards (3x3 and 4x4) are solved with exact search algorithms, breadth-first search and IDA* with pattern databases, that explore millions of positions in your browser. Larger boards use a fast row-by-row method, the same idea a person uses by hand, refined by the computer. Even an 8x8 board is solved in a fraction of a second.

All of it runs on your own device. Nothing is sent to a server.

Why some puzzles can't be solved

If a tile is removed and put back in the wrong place, or two tiles are swapped, the puzzle may become impossible. No sequence of slides will ever fix it. Most solvers bury this in their FAQ. Here, a clear warning appears above the board the moment you enter such a position, together with a Fix it button that swaps two neighboring tiles to make the board solvable again. The most famous impossible position is Sam Loyd's 14-15 puzzle, a 15-puzzle with only tiles 14 and 15 swapped.

Supported sizes

The solver handles every square board from 3x3 to 8x8:

  • 3x3: the classic 8-puzzle, the most common size in phone games and kids' toys.
  • 4x4: the 15-puzzle, played with numbers or a picture.
  • 5x5 to 8x8: big boards for experts, solved with the fast row-by-row method.

Each popular size has its own page with size-specific tips. See Solve by size below.

Picture puzzles

Many sliding puzzles use a picture instead of numbers. Upload a photo, drag it onto the board, paste it from your clipboard or enter an image URL, and the board is cut into pieces automatically. Turn on Show numbers to see which number each piece stands for. That makes it easy to copy a picture puzzle from a game: number the pieces of the finished image from left to right and top to bottom, then enter your scrambled board.

Share or save a puzzle

Press Copy link to get a link to the exact position on your board. Send it to a friend or bookmark it to finish later.

Solve by size

3x33x3 sliding puzzle solverThe classic 8-puzzle4x44x4 sliding puzzle solverNumbers or your own picture15 Puzzle15 puzzle solverThe classic numbered board

Frequently asked questions

Is this sliding puzzle solver free?

Yes. It is completely free, needs no account and no download, and runs entirely in your browser on desktop, tablet or phone.

Why does the solver say my puzzle is unsolvable?

Exactly half of all possible tile arrangements can never be solved by sliding. This usually happens when two tiles were entered in the wrong order or a tile was popped out and put back. Press "Fix it" and the solver swaps two neighboring tiles so the puzzle becomes solvable.

What puzzle sizes are supported?

Every square board from 3x3 up to 8x8. The tool opens on a 3x3 board; pick another size from the size menu under the board.

Can I solve a picture puzzle?

Yes. Upload an image or paste an image URL and the board turns into a picture puzzle. Tile 1 is the top-left piece of the finished picture, tile 2 is the piece to its right, and so on. Your image never leaves your device.

How many moves will the solution take?

It depends on the size and the scramble. Moves are counted as single-tile slides. A 3x3 puzzle never needs more than 31 moves and a 4x4 puzzle never more than 80. Larger boards can take several hundred moves.

Does it work on my phone?

Yes. The board and the Solve button fit on one screen, you can tap or swipe tiles, and there is nothing to install.