8 Puzzle Solver

AI-powered puzzle solver, let you find the solution of the sliding 8-puzzle in just a second.

Step 1: Upload Template

To get started, upload your image template or take a photo below.

Want to give it a try? Slide the tiles and see if you can solve it.

Step 2: Arrange Puzzle to Solve

Which tile is the empty space?
Click or tap that tile in the photo below.
No tile selected

First, click or tap the tile that represents the empty space. Then drag and drop all nine tiles from the photo on the left into the solved arrangement on the right. For the default example, choose tile 9 (bottom right) as the empty space.

1
2
3
4
5
6
7
8
9
Scramble — drag these tiles
Complete photo — drop tiles here

How it works

The solver checks whether your arrangement is reachable, then uses A-star search to find a shortest path from your puzzle photo to the target you arranged.

Frequently Asked Questions

How do you solve an 8 puzzle?

Slide a tile next to the empty space into that space until the board matches your target arrangement. To use this solver, upload your puzzle photo, select the blank, and arrange all nine tiles into the completed image in Step 2. Choose Solve Puzzle, then use the playback controls to follow each move.

Can an 8 puzzle be unsolvable?

Yes. Some arrangements cannot reach a particular target through legal slides. The solver checks the tile-order parity before searching. If your arrangement is marked unsolvable, check your chosen blank and the placement of every tile in the completed image.

Can I solve a 3x3 sliding puzzle using a photo?

Yes. Upload an image or use Take Photo to capture your 3x3 board. The puzzle grid is automatically cropped. Select the empty space, then arrange the completed image so the solver knows where each tile belongs. Use a clear, straight-on photo with the whole board visible, and check the crop before continuing.

What is the minimum number of moves to solve an 8 puzzle?

The minimum depends on the starting board and your target arrangement. A completed puzzle needs zero moves. Each slide of one tile into the empty space counts as one move. The solver returns a shortest solution for your arrangement; its starting distance estimate is a lower bound and can be smaller than the actual move count.

What is the difference between an 8 puzzle and a 15 puzzle?

An 8 puzzle has eight movable tiles and one empty space on a 3x3 board. A 15 puzzle has fifteen movable tiles and one empty space on a 4x4 board. Both follow the same sliding rule, but the larger board has far more possible arrangements. For a 4x4 board, use our 15 Puzzle Solver.

Why does my 8 puzzle take longer to solve?

Some starting arrangements require the solver to examine more possible moves before confirming a shortest solution. Photo processing, server load, and your network connection can also affect how long the complete request takes. The displayed search time measures the server search rather than photo upload or animation.

Does the 8 Puzzle Solver work on mobile devices?

Yes. Use a mobile browser with JavaScript enabled to upload a photo, select the blank, arrange the tiles, and follow the solution. You can drag tiles with your finger. Take Photo can open your camera when supported by your device and browser.

Is the 8 Puzzle Solver free?

Yes. You can upload your puzzle photo, check solvability, find a shortest solution, follow the moves, and share your solution for free. No account is required.

star
A-star Search Algorithm

Explores promising moves first and keeps track of visited arrangements to find a shortest solution.

call_split
Tile Distance

Measures how far each tile is from its target cell using horizontal and vertical distance to guide the search.

text_rotate_vertical
Solvability Check

Checks whether the chosen blank and tile arrangement can be reached through legal sliding moves before searching.