Picture settings
Arrow keys slide a tile into the gap in that direction: ↑ lifts the tile below the gap, ← pulls in the tile to its right.
Mouse or touch: press any tile in the gap's row or column and it slides at once, pushing the tiles between it and the gap along.

Algorithm notation. A move slides one tile into the gap and is named by the direction the tile moves: U up, D down, L left and R right, so U lifts the tile below the gap. A number slides several tiles in a row: R3 moves the gap three places left as three tiles each slide one place right. A prime reverses a move (R' is the same as L). The arrow keys slide tiles the same way, and clicking a tile in the row or column of the gap slides it together with the tiles between them. Brackets repeat or invert a group: (D R U L)x3 or (D R U L)3 plays it three times and (D R U L)' plays its inverse. Your picture, the size and the numbers setting are stored in the page link, so the link and embed boxes share your own puzzle. The second input loads an algorithm into the player under the puzzle, played on the puzzle as it stands (set up a scramble with the first input): step through it with the buttons, press play, or click a move to jump there.

Sliding 15 Puzzle made from a beach photo, with one tile missing to leave the gap

Online Sliding 15 Puzzle Simulator

Play the 15 puzzle online with numbers or your own picture. Choose 3x3, 4x4 or 5x5, scramble a solvable position, time your solve and share the link.

Play the 15 Puzzle Online

The 15 puzzle is one of the oldest sliding and non-twisty puzzles: fifteen numbered tiles in a 4×4 frame with one empty space. You slide tiles into the gap until they are back in order. This simulator lets you play the 15 puzzle online for free, practise the smaller 8-puzzle or the bigger 24-puzzle, and even turn any picture into a puzzle you can send to a friend.

A short history of the 15 puzzle

The puzzle is credited to Noyes Palmer Chapman, the postmaster of Canastota, New York, who is said to have shown friends a precursor as early as 1874. It became a craze in the United States in 1880, under names like the Gem Puzzle, the Boss Puzzle, the Game of Fifteen and the Mystic Square. Sam Loyd later claimed to be the inventor and offered a $1,000 prize for swapping the 14 and 15 tiles. Nobody could win it, because Johnson and Story had already proved in 1879 that exactly half of all starting arrangements can never be solved. It is the same kind of parity rule that makes an unsolvable Rubik's Cube after a reassembly.

Three 15 puzzle sliding puzzles with numbers, a picture and letters
Sliding 15 puzzles come with numbers, letters or pictures.

How to use the simulator

  • Pick the size from the dropdown: 3x3 (8-puzzle), 4x4 (15-puzzle, the default) or 5x5 (24-puzzle).
  • Click any tile in the same row or column as the gap to slide it. If other tiles are in the way, they all slide together.
  • You can also drag tiles with the mouse or move them with the arrow keys.
  • Scramble always gives a solvable position. Undo takes back moves, Reset restores the solved puzzle, and the move counter shows how efficient you were.
  • Start and stop the timer with the button or the Space key. Scrambling does not start it, so you can plan your first moves.

Make a picture puzzle from any image

Open the Picture settings panel and paste the URL of any image to cut it into tiles. Turn on numbers if you want a hint on every tile. All settings are stored in the page address, so you can share your custom puzzle as a link or put it on your website with the embed box.

Sliding puzzle notation

Each letter moves one tile into the gap: U slides a tile upward, D downward, L to the left and R to the right. A number repeats the move, so R3 slides three tiles to the right. Type a sequence into the algorithm box and use the player to step through it one move at a time.

How to solve the 15 puzzle

  1. Solve the top row. Place 1 and 2 directly, then bring 3 and 4 together: park 4 under its target, put 3 in the corner position of 4, and slide both into place.
  2. Solve the second row (5 to 8) the same way. From now on, never disturb the finished rows.
  3. Solve the last two rows column by column: pair 9 with 13, then 10 with 14, using the same parking trick.
  4. Finish with 11, 12 and 15 by cycling them around the remaining 2×2 block. The step-by-step 15 puzzle solution shows every case with pictures.

New to sliding puzzles? Warm up on the 3x3 board, which uses the same row-by-row ideas. On the 5x5, solve the top row and the left column first, and the rest behaves like a 4x4. The shortest possible solution is never longer than 31 moves for the 8-puzzle and 80 single-tile moves for the 15 puzzle, a nice parallel to God's Number for the cube.

Solved sliding 15 puzzle with tiles 1 to 15 in order
The goal: tiles 1 to 15 in order with the gap in the bottom right corner.

Why can't I swap only the 14 and 15 tiles?

Every slide changes the order of the tiles in a way that keeps a hidden parity unchanged. Swapping just two tiles flips that parity, so it can never be reached by legal moves. The mathematics of permutations explains the idea in more depth.

Is every scrambled position solvable?

Yes. The Scramble button only produces positions that can be solved, so you will never meet Sam Loyd's impossible 14-15 arrangement here.

What other puzzles can I play online?

Try the Hungarian Rings simulator, where balls slide around two crossing tracks, or the classic Rubik's Cube simulator.