Sliding Puzzle
Slide tiles into order: 1 to {{ size * size - 1 }}, empty space in the bottom-right corner.
MOVES
{{ moves }}
Time:
{{ val || '' }}
Solved in {{ moves }} moves!
Click a tile adjacent to the empty space, or use arrow keys / swipe
How to Play the Sliding Puzzle
The sliding puzzle (also known as the 15-puzzle) is a classic brain teaser. Tiles are arranged on a grid with one empty space. Slide tiles one at a time into the empty space to arrange them in numerical order from 1 to {{ size * size - 1 }}, leaving the empty space in the bottom-right corner.
Choose 3×3 for a quick solve, 4×4 for the classic challenge, or 5×5 if you want a serious workout. Every puzzle generated here is guaranteed to be solvable.
Sliding Puzzle Tips & Strategy
- Solve the top row first (and the left column on 4x4/5x5 boards), then treat the remaining tiles as a smaller sliding puzzle.
- Solve the last two tiles of a row or column together using a small rotation maneuver, rather than trying to place them one at a time.
- On larger boards, save the bottom-right rows and columns for last — they're the most constrained and easiest to lock in once everything else is in place.
- Prioritize accuracy over speed if you're still learning the technique — chasing a low move count before you're comfortable often causes more mistakes.
Frequently Asked Questions
Three sizes: 3x3 (the 8-puzzle), 4x4 (the classic 15-puzzle), or 5x5 (the 24-puzzle) for a bigger challenge.
Click or tap a tile next to the empty space to slide it into the gap, or use the arrow keys / swipe to slide a tile from that direction into the gap.
Yes. Every puzzle generated here is shuffled using a method that guarantees it can always be solved.
The puzzle is solved when the tiles read 1 through N-1 in order, left to right and top to bottom, with the empty space in the bottom-right corner.
No, they're just there for your own reference. There's no penalty for taking your time or using extra moves.