Slide Puzzle: How to Solve Any Size, Free Online
Learn how to solve a slide puzzle of any size: rules, the layer method, a worked 3x3 example, good move counts and how to spot unsolvable boards. Play free.

A slide puzzle is a square frame of numbered tiles with one empty space. You slide tiles into the gap, one row or column at a time, until the numbers read 1, 2, 3 and so on from the top-left, with the hole finishing in the bottom-right corner. Nothing is hidden and nothing is random once the board is dealt, which is exactly why it feels so frustrating when you get stuck one tile from the end. You can play the Number Slide puzzle on Puzzit free in your browser, on boards from 3x3 up to 8x8, with no download.
This guide covers the rules, a layer-by-layer method that solves any size, a fully worked 3x3 example, what a good move count looks like, and how to tell in ten seconds whether a scrambled board can be solved at all.
GOAL
Order every tile
1 in the top-left, highest number last, empty space in the bottom-right.
BOARDS
3x3 to 8x8
Start on 3x3 (8 tiles), move to the classic 4x4 "15 puzzle", then go big.
ON PUZZIT
Free, no sign-up
Tap, click, swipe or use the arrow keys. Every board dealt is solvable.
How to Play the Slide Puzzle
- Pick a grid size. The 3x3 board has 8 tiles, the 4x4 has 15 (the famous 15 puzzle) and the 8x8 has 63.
- Tap or click a tile that sits in the same row or column as the empty space. It slides toward the gap.
- If the tile you tap is two or three squares away, every tile between it and the gap slides together. On Puzzit that whole slide counts as a single move.
- On a keyboard, the arrow keys (or WASD) push a neighbouring tile into the gap. Pressing Up moves the tile below the hole upward, so think of the key as the direction the tile travels.
- The puzzle is solved when every number is in order, read left to right and top to bottom, and the space sits in the bottom-right corner. Puzzit then shows your time and moves and adds to your win streak.
The counters at the top of the game track time, moves, streak and total wins, so the real challenge after your first solve is doing it again in fewer moves.
How to Solve a Slide Puzzle of Any Size
Random sliding gets you nowhere. The reliable method solves the board in layers so finished tiles never need to move again:
- Solve the top row. Bring tile 1 to the top-left corner, then 2 next to it, and so on. Move the empty space around a tile to push it where you want it: the space goes to the side of the tile you want it to travel toward, then the tile slides in.
- Handle the last tile of the row with the corner trick. Park the second-to-last tile in the last corner, put the last tile directly below it, then slide the pair into place together: the corner tile drops left and the one below rises up behind it. Trying to place the last tile directly almost always knocks the row apart.
- Solve the left column the same way, top to bottom. Use the same corner trick for its last two tiles (two tiles side by side, then rotate them in).
- Repeat on the smaller board. After one row and one column, a 4x4 becomes a 3x3, a 5x5 becomes a 4x4, and so on. Peel off a row and a column each time.
- Finish the final 2x2. Three tiles and the gap remain. Rotate them around the square in one direction until they fall into order. If they never line up, a tile outside the 2x2 is out of place.
That is the whole slide puzzle strategy. It is not the shortest route, but it never fails, and on Puzzit's bigger boards (6x6 to 8x8) it is the only practical way to keep track of the board.
How to Solve a 3x3 Slide Puzzle: A Worked Example
Here is a real board dealt by Puzzit's 3x3 mode while we were testing it. The empty space starts in the middle:
| 3 | 4 | 2 |
| 1 | 6 | |
| 5 | 7 | 8 |
Start: 3 4 2 / 1 _ 6 / 5 7 8
We ran a breadth-first search on this position to find the shortest possible answer. Moving one tile at a time it needs 16 moves. Using Puzzit's multi-tile slides it needs only 12 taps: 1, 3, 4, 1, 3, 5, 8, 6, 5, 4, 2, 6. On the taps of 8, 5, 2 and the final 6, the tile you tap is two squares from the gap, so two tiles slide at once. We solved this same board on Puzzit while testing it, and checked the 12-tap line against Puzzit's sliding rules in a simulation.
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 |
Solved: 1 2 3 / 4 5 6 / 7 8 _
You will not usually spot the optimal line by eye, and you do not need to. The layer method above solves this board too: top row (1, 2, 3), left column (4, 7), then rotate 5, 6 and 8 around the last 2x2.
What Is a Good Move Count?
Because Puzzit counts a multi-tile slide as one move, your score is measured in what puzzle solvers call the multi-tile metric. That changes the targets. We checked the 3x3 numbers ourselves by searching all 181,440 solvable positions:
| Board | Solvable positions | Hardest position (one tile per move) | Hardest position (Puzzit moves) |
|---|---|---|---|
| 3x3 | 181,440 | 31 moves | 24 moves |
| 4x4 (15 puzzle) | about 10.5 trillion | 80 moves | 43 moves |
On 3x3, the average optimal solution is about 16.6 Puzzit moves, and no solvable board ever needs more than 24. If you finish a 3x3 in under 30 Puzzit moves you are playing well, since the layer method trades some efficiency for reliability. Try to get your count closer to that average with each game. The 4x4 figures come from published computer searches: the hardest 15 puzzle positions need 80 single-tile moves, or 43 when sliding a whole row counts as one. On 4x4, simply finishing is the first goal; after that, compare each new game with your last move count.
Is Every Slide Puzzle Solvable?
No, and this is the question behind most "I'm stuck with two tiles swapped" posts. Exactly half of all ways to place the tiles can never be solved, no matter what you do. Mathematicians W. W. Johnson and W. E. Story proved this in 1879, and it is why Sam Loyd's famous challenge to swap only the 14 and 15 had no answer.
You can check any board yourself by counting inversions: read the tiles left to right, top to bottom (ignoring the space), and count every pair where a bigger number comes before a smaller one.
- Odd-width boards (3x3, 5x5, 7x7): solvable only if the number of inversions is even. Our worked example above has 6 inversions, so it checks out.
- Even-width boards (4x4, 6x6, 8x8): count the row of the empty space from the bottom (bottom row = 1). The board is solvable only if inversions plus that row number is odd.
- A 4x4 board that is solved except for 14 and 15 swapped has 1 inversion with the space on row 1: 1 + 1 = 2, which is even, so it is impossible.
The good news: Puzzit only deals solvable boards, so if you finish with two tiles swapped in the Number Slide game, a tile somewhere else is out of place. Go back to the last row you finished and redo the corner trick. If you are fighting a slide puzzle inside another video game, run the inversion check before you spend an hour on it.
Slide Puzzle Tips That Save Moves
- Move the gap, not the tile. Think about where the empty space needs to be next. Most wasted moves come from chasing a tile instead of steering the hole.
- Use long slides. On Puzzit, tapping a tile three squares from the gap moves three tiles for the price of one move.
- Keep solved tiles in place, except during the corner trick, when you briefly move them on purpose.
- Look one tile ahead. While placing 3, notice where 4 is and avoid burying it in a corner.
- Bigger boards are not harder, just longer. An 8x8 uses the same steps as a 4x4, so learn the method on 3x3 and 4x4 first.
Slide Puzzle Online vs the 15 Puzzle Toy
The physical 15 puzzle became a worldwide craze in 1880. It was created by Noyes Palmer Chapman, a postmaster in Canastota, New York, although puzzle writer Sam Loyd later claimed credit for decades. Chess champion Bobby Fischer was famously quick at it and solved one in 17 seconds on The Tonight Show on November 8, 1972.
Playing a slide puzzle online adds things the plastic toy cannot: a fresh, guaranteed-solvable shuffle every time, a move counter and timer, multi-tile slides, and board sizes from 3x3 to 8x8 in one place. The toy is still great for a desk, but it can be pried apart and reassembled into an impossible position, and it never tells you your move count.
If you enjoy the planning in a slide puzzle, try 2048, which uses the same sliding motion but merges tiles, or Ball Sort Puzzle, where one wrong move can block everything (see our ball sort puzzle guide). Mini Sudoku and Shikaku reward the same order-from-chaos thinking, and our number puzzle games roundup covers the rest of the collection on the number games page.
Slide Puzzle FAQ
What is a number slide puzzle?
A number slide puzzle is a grid of numbered tiles with one empty space. You slide tiles into the space to put the numbers back in order. The 4x4 version with 15 tiles is called the 15 puzzle; the 3x3 version is often called the 8 puzzle.
How do you solve a slide puzzle step by step?
Solve the top row, then the left column, using the corner trick for the last tile of each. Repeat on the smaller board that remains, then rotate the final three tiles around the last 2x2 until they drop into place.
How do you solve a 3x3 slide puzzle?
Place 1, 2 and 3 in the top row, then 4 and 7 in the left column. Rotate 5, 6 and 8 around the remaining 2x2. Any solvable 3x3 board can be finished in at most 31 single-tile moves, or 24 moves on Puzzit, where multi-tile slides count as one.
Why can't I solve my slide puzzle?
Half of all tile arrangements are unsolvable. Count the inversions (see above) to check. On Puzzit every board is solvable, so if you are stuck with two tiles swapped, something earlier is out of place: rebuild the last row with the corner trick.
Do I need a sliding puzzle solver?
Online solvers can find the shortest path if you type the board in, but the layer method solves any board without one. On 3x3 it is also worth learning, because it trains the same planning you need for 4x4 and bigger grids.
Can I play the slide puzzle online for free on my phone?
Yes. The Puzzit Number Slide puzzle runs in any modern mobile browser. Tap or swipe tiles to slide them; there is nothing to install and no account needed.
Play the Slide Puzzle Now
Start on 3x3 to learn the corner trick, then step up to the 4x4 15 puzzle and see how close you can get to the 43-move limit.