Skip to content
vladier

Sliding Puzzle

Slide the tiles into order, 1 to the last number, with the gap at the end.

Published Oct 30, 2026

How to play the sliding puzzle

The board holds numbered tiles and one empty square. Slide tiles into the gap until they read in order, left to right and top to bottom, with the gap in the bottom right corner. A 3×3 board uses tiles 1 to 8 (often called the 8 puzzle), a 4×4 uses 1 to 15 (the classic 15 puzzle), and a 5×5 uses 1 to 24.

  • Tap or click a tile next to the gap to slide it in. Tap a tile further along the same row or column to slide the whole line at once.
  • Swipe on a phone to push the tile next to the gap in that direction.
  • Arrow keys work on a computer. Up moves the tile under the gap up, Left moves the tile to the right of the gap left, and so on.

Tiles that are already in their home square are tinted, so you can see your progress at a glance. The timer starts with your first move.

A simple method that always works

You do not need to plan the whole board. Solve it in layers, and never disturb what you have finished.

  1. Top row first. Bring tile 1 home, then 2. For the last two tiles of a row, place them as a pair: park the second to last tile in the corner, the last tile right below it, then move the gap into the empty spot next to them and slide both into place.
  2. Then the left column. Use the same pair trick for the column, so the board shrinks to a smaller square.
  3. Repeat until only a 2×2 corner is left. That last block solves itself by turning the three tiles around the gap.

On a 4×4 this means solving row 1, column 1, then the remaining 3×3 just like an 8 puzzle. A 5×5 adds one more round of the same steps.

Tips for fewer moves

  • Move the gap, not the tile. A tile can only move into the gap, so think about walking the gap around to the side of the tile you want to push.
  • Avoid undoing yourself. Sliding a tile right and then straight back left wastes two moves. Look one step ahead before each slide.
  • Use the row slide to move several tiles in one action. It does not save moves, but it saves time.

Some history and numbers

The 15 puzzle became a craze in the United States around 1880. In 1879 two mathematicians, William Johnson and William Story, showed that exactly half of all arrangements of the tiles can never be solved. If two tiles are swapped in a finished puzzle, no amount of sliding will put them back. Computer searches later found that any solvable 8 puzzle needs at most 31 single-tile moves, and any solvable 15 puzzle at most 80. Finding those shortest paths by hand is very hard, so a much higher move count is normal.

If you enjoy logic puzzles with a clear goal, try Mini Sudoku for a short break, or Minesweeper for something with a little more risk.

Questions

Is every shuffle solvable?

Yes. Only half of all possible tile arrangements can be solved, and the game checks the shuffle with the standard parity rule before you see it. If a mix comes out unsolvable, two tiles are swapped to fix it.

How are moves counted?

Each tile that slides counts as one move. If you press a tile three squares away from the gap, the three tiles between move together and that counts as three moves.

Can I play with the keyboard?

Yes. The arrow keys (or W, A, S and D once you have clicked the board) slide the tile next to the gap in that direction. Pressing Up moves the tile below the gap up into it.

Where are my best scores kept?

Your fewest moves and fastest time for each size are saved in this browser only. They are separate for 3×3, 4×4 and 5×5.