How to Solve a Slide Puzzle

Quick Answer: One Line at a Time

A sliding puzzle is solved one outside row and one outside column at a time. Lock each line as soon as it is finished, and every completed line shrinks the board by a row or a column.

A 3×3 ends with three tiles in a 2×2 corner. A 4×4 ends the same way, once its border has been reduced to a 3×3.

Before you slide anything, find out whether the board can be finished at all. Half of all 3×3 arrangements cannot be, and no sequence of moves will ever solve them. Check your board first, then work through the method below.

If Your Puzzle Has a Picture Instead of Numbers

Number the board on paper first. Read left to right, top to bottom, giving each square the next number: 1, 2, 3 across the top row, continuing on the row below. Leave the empty square unnumbered.

Every instruction below refers to tiles by number. Once the picture has numbers, a picture puzzle behaves exactly like a numbered one. Photograph the board before you move anything — on a 4×4 it is easy to lose track of which tile came from where.

Solve a 3×3 Board, One Line at a Time

Finish the top row

Put 1 in the top-left corner and keep it there. Then bring 2 and 3 across as a pair: get 3 sitting beside 2, then slide both into the top row together.

Do not try to place 3 in its final corner while 2 is still loose. Bring the two tiles together first, then move the pair.

3×3 slide puzzle top row solved, with 2 and 3 moving into place
Two legal moves put 2 and 3 into the top row while 1 stays fixed.

Finish the left column

With the top row locked, put 4 and 7 into the left column beneath the 1. Work down from the top, and bring the second tile of that column in behind the first rather than in front of it.

Five tiles are now fixed: 1, 2, 3, 4 and 7. They should not move again, so route the remaining moves around them.

Rotate the last 2×2

Only 5, 6, 8 and the empty square are left, in the bottom-right 2×2. Those four squares form a loop: sliding around it moves the blank one square at a time and rotates the other three tiles with it.

Pick a direction and stay with it until 5, 6 and 8 are in order. Do not reverse halfway — reversing undoes the rotation you have already made. A full four-move circuit changes the order of the three tiles, so stop as soon as they are in place.

The last 2×2 loop of a 3×3 slide puzzle with the blank square moving around it
Each adjacent frame shows one legal slide around the final 2×2.

Solve a 4×4 Board (the 15 Puzzle)

A 4×4 can be reduced to a 3×3 by finishing its top row and left column first. Keep enough open space to move tile pairs while building the border.

Step 1 — top row. Get 1, 2, 3 and 4 across the top and lock them. Move the last two tiles of the row together so placing one does not dislodge the other.

Step 2 — left column. Put 5, 9 and 13 under the 1, working in the free space below. The last two tiles of that column travel as a pair.

Step 3 — solve what is left. The remaining nine squares are a 3×3: 6, 7, 8, 10, 11, 12, 14, 15 and the blank. Run the same row, column and final 2×2 method on it.

Keep one column of free space while you reduce. Shoving tiles into every corner leaves no room to rotate a pair without breaking a line you already finished.

4×4 slide puzzle reduced from the full board to a 3×3 sub-puzzle
Finish the top row, finish the left column, then work inside the remaining 3×3.

Boards Larger Than 4×4

The method does not change with size. Lock the top row, lock the left column, and repeat until a 3×3 is left. A 5×5 takes two rounds of that, and a 6×6 takes three.

What changes is the cost of a mistake. On a large board a tile out of place inside a locked line takes many more moves to repair, so lock a line only when every tile in it is genuinely finished.

Two habits make big boards manageable: keep free space around the tiles you are placing, and solve in the same order every time so a mistake shows up straight away.

The slide puzzle solver on this site covers 3×3 and 4×4 boards. For 5×5 and above, the sequence above is the one to use.

Stuck on the Last Two Tiles

Near the end, two tiles may look out of order — usually the last two numbers. Sliding them back and forth gets you nowhere.

Only two tiles are swapped. If every other tile is in its correct square, no sequence of legal slides can fix the pair. On a physical puzzle, the pieces may have been lifted and returned in the wrong order.

Other tiles are also out of place. There may still be a legal path. Open a wider work area so the pair can travel around other tiles together; the four moves below show how a blank can move through a 3×2 area, not a direct swap of two tiles.

Watch the four moves in order, then enter your position into the slide puzzle solver. If it can produce a solution, follow the moves shown; if it reports the board as unsolvable, no amount of sliding will help.

Four legal moves around a 3×2 area in a slide puzzle
A four-frame sequence through a 3×2 work area. The blank moves one square per frame.

Check Whether a Board Can Be Solved

Half of all 3×3 arrangements cannot be finished. A 3×3 has 362,880 arrangements of eight tiles and one blank, and only 181,440 of them can be reached by sliding from the solved position.

The test is the inversion count. Read the tiles in order, ignoring the blank, and count every pair where a larger number comes before a smaller one. On a 3×3 an even count can be solved and an odd count cannot.

On a 4×4, add the number of the blank's row counted from the bottom (bottom row = 1): an odd total can be solved, an even total cannot. A 4×4 has about 10.4 trillion reachable positions out of 16! arrangements, so the check is worth running before you start.

The invariant is the board's solvability class. A vertical move on a 4×4 changes the inversion count, but also changes the blank's row, so the combined test stays consistent through every legal slide.

You do not have to count by hand. Check whether your board can be solved before spending twenty minutes sliding towards a position that was never reachable.

Frequently Asked Questions

What is the best strategy for a sliding puzzle?

Reduce the board, do not hunt for single moves. Lock the top row, lock the left column, then repeat on what is left. Every finished line removes a row of searching, and the puzzle gets strictly smaller each time.

How do I get faster at sliding puzzles?

Learn the shapes rather than the moves. A pair that travels together and a 2×2 that is one rotation from done are useful patterns to recognise.

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

The 8-puzzle is the 3×3 board: eight tiles and a gap. The 15 puzzle is the 4×4 board: fifteen tiles and a gap. Same puzzle, different grid, and the same method works on both.

Can a slide puzzle be impossible to solve?

Yes. On a 3×3, exactly half of the possible arrangements cannot be reached by sliding. If two tiles are swapped and everything else is correct, no sequence of moves will fix it.

Why do I keep ending up with two tiles swapped?

If exactly two tiles are swapped and every other tile is correct, that arrangement is unsolvable by sliding. If other tiles are also out of place, keep an open work area and move the tiles together rather than trying to swap them in place.

Does this method work for 5×5 and 6×6 puzzles?

Yes. Lock the top row and the left column, then repeat on what remains until you are down to a 3×3. It takes more passes and leaves less room for error, but the sequence is identical.

How do I number a picture puzzle?

Read left to right and top to bottom, giving each square the next number and leaving the blank unnumbered. Write the numbers on sticky notes so the picture stays intact.

What counts as the last 2×2?

The four squares in the bottom-right corner, once everything above and to the left of them is finished. On a 3×3 that is three tiles and the blank; on a 4×4 you reach the same shape after reducing the border.

Can I see the moves without working them out myself?

Yes. Enter the board into the slide puzzle solver — it checks the position first, then steps through a solution move by move.