Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Sliding puzzle

The classic 15 puzzle in four sizes, with numbers or a picture (even your own photo). Every shuffle can be solved, and 3 x 3 gives hints.

Moves 0Time 0 s

How to play

  1. Pick a size and press New game. The tiles are shuffled, and every shuffle can be solved.
  2. Tap 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 (it counts as one move per tile).
  3. Put the tiles in order, 1 at the top left, with the gap at the bottom right.
  4. Choose Picture to play with a built-in picture, or pick your own photo. Your photo is only used on this page and never uploaded.
  5. On 3 × 3, Hint shows the best next tile and how many moves the shortest solution needs.

Keyboard and touch

← → ↑ ↓Slide the tile next to the gap in that direction (click or tab into the board first)
Tab then EnterSlide the tile that has focus
TapSlide a tile, or a whole line of tiles, into the gap

Tips

  • Solve the top row first, then the left column. The puzzle is then one size smaller; repeat until only 3 × 3 is left.
  • Place the last two tiles of a row together: put the last one below its spot, slide the other in front, then rotate both into place.
  • Tiles that are already in their home spot are shaded, so you can see your progress.
  • The hardest 3 × 3 positions need 31 moves; the hardest 4 × 4 positions need 80.
  • Half of all arrangements can never be solved. The 1880s "14-15" craze offered a prize for exactly such an impossible swap.

About this game

Shuffles pick a truly random arrangement and keep only solvable ones: for an odd width the number of "inversions" (pairs of tiles in the wrong order) must be even; for an even width the inversions plus the gap's row counted from the bottom must be odd. That rule is why a random shuffle is fair while swapping two tiles makes a puzzle impossible.

The 3 × 3 hint uses the A* search with the Manhattan distance plus "linear conflicts", which always finds a shortest solution. Best results are kept only in this browser. No pictures, moves or times leave your device.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product