How to play the 15 puzzle
The board holds numbered tiles and one empty square. Tap or click any tile in the same row or column as the empty square and it slides into the gap; if several tiles are between, the whole line slides together and each tile counts as one move. You can also swipe on the board or use the arrow keys (or W, A, S, D) to push a tile into the gap. The puzzle is solved when the tiles read 1, 2, 3 and so on from left to right, top to bottom, with the empty square in the bottom-right corner.
Choose 3Γ3 (the 8 puzzle) for a quick warm-up, 4Γ4 for the classic 15 puzzle, or 5Γ5 (the 24 puzzle) for a long challenge. Your best result for each size, fewest moves first and then time, is saved on your device. Tiles already in the right place turn green.
Every shuffle is solvable
Exactly half of all random arrangements of a sliding puzzle cannot be solved. That is a mathematical fact based on parity: count the pairs of tiles that are in the wrong order (inversions); on odd-width boards the count must be even, and on even-width boards it depends on which row holds the gap. This game checks parity for every shuffle and fixes it before you start, so you will never be handed an impossible board.
Strategy: solve it row by row
- Top row first. Place 1, 2 and 3 in order. Put 4 just below its final square, then rotate 3 and 4 into place together.
- Then the second row the same way (5β8). After that the top two rows are done and never need to move.
- Finish with columns. For the last two rows, solve the left column pair (9 and 13) together, then 10 and 14, and the last small 2Γ3 area takes only a little cycling.
- Move the gap, not the tile. Think about where the empty square needs to be to push a tile where you want it.
- Use the hint when you are stuck: it searches ahead from your current position and highlights a good next tile.
A little history
The 15 puzzle became a craze in the United States and Europe around 1880. Its inventor is generally credited as Noyes Chapman, a postmaster in New York State. A famous version with tiles 14 and 15 swapped was promoted as a prize challenge, but that position is one of the impossible ones. Mathematicians later used the puzzle to study permutations and search algorithms, and it is still a standard test problem in artificial intelligence courses.
FAQ
Is this sliding puzzle free?
Yes, it is free to play in any modern browser on phone, tablet or computer, with no download or sign-up.
Is every puzzle solvable?
Yes. Each shuffle is checked with the parity rule, and unsolvable arrangements are corrected before the game starts.
How are moves counted?
Every tile that slides counts as one move. Sliding a line of three tiles at once counts as three moves.
Can I play offline?
Yes. After the page has loaded once, your browser keeps a copy so the game opens without internet.
What is the minimum number of moves for the 15 puzzle?
Researchers proved that any 4Γ4 position can be solved in at most 80 single-tile moves, but most shuffles need far fewer when played well.