Sliding Puzzle Solver
Set up any 8-puzzle or 15-puzzle by sliding the tiles — or scramble one — then watch the solver play out the solution, step by step. Everything runs in your browser, nothing is uploaded.
How to Use the Solver
Choose 3×3 or 4×4, then build the puzzle you're stuck on: click any tile next to the empty gap to slide it, and keep going until the board matches yours. Prefer a random one? Hit Scramble. Then press Solve and the tiles slide themselves into order, one move at a time, with a running move count. Reset returns to the solved board. Because you build the puzzle by sliding real tiles, it's always solvable.
How the Solver Works
The solver searches with IDA* — iterative-deepening A* — guided by two classic admissible heuristics: Manhattan distance (how far each tile is from home) plus linear conflict (extra moves when two tiles in their goal row or column are reversed). For the 3×3 that finds a provably shortest solution instantly. The 15-puzzle's search space is astronomically larger, so there the solver uses a lightly-weighted search that returns a fast, near-shortest solution rather than grinding for the absolute minimum — keeping it instant in your browser. Nothing leaves your device.
Frequently Asked Questions
How do I set up my puzzle?
What sizes does it solve?
Does it find the shortest solution?
How does the solver work?
Is anything uploaded?
Related Solvers & Puzzles
Want to play instead? Try the photo Sliding Puzzle. Solving other puzzles? Use the Sudoku Solver or the Minesweeper Solver, or browse all AI solvers & analyzers.
Add This Sliding Puzzle Solver to Your Website
Put the Sliding Puzzle Solver on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.