Clever Quest Lab ← Games

15 Puzzle

Slide the numbered tiles back into order, 1, 2, 3 and so on, with the gap in the bottom right corner.

0Moves
0:00.0Time
–Best time
–Best moves

15 Puzzle

Click or tap a tile in the same row or column as the gap to slide it. Arrow keys or WASD move a tile into the gap in that direction.

Click a tile in the same row or column as the gap to slide it. Arrow keys or WASD move a tile into the gap in that direction.

Tap a tile in the same row or column as the gap to slide it, or swipe the way a tile should move.

Put the numbers in order with the gap last. The clock starts with your first move.

Size

No record for 4×4 yet.

← ↑ → ↓ or W A S D move a tile into the gap in that direction (→ slides the tile left of the gap to the right) · click or tap a tile in line with the gap · H hint · P pause · N new game · F full screen

← ↑ → ↓ or W A S D move a tile into the gap in that direction (→ slides the tile left of the gap to the right) · click a tile in line with the gap · H hint · P pause · N new game · F full screen

Tap a tile in line with the gap, or swipe: the tile next to the gap slides the way you swipe.

Runs on your device. Nothing you type or record is uploaded. Keeps working without a connection while the page is open. Works with touch. Saves your best time and fewest moves for each board size, and your size and hint settings, on this device.

Added · Updated : the craze is now dated around 1880, since a journal note of December 1879 already describes it

How to play

The 15 puzzle is a square tray of numbered tiles with one empty space. A tile next to the gap can slide into it, which moves the gap. Keep sliding until the numbers read in order from left to right and top to bottom, with the gap in the bottom right corner. On the classic 4×4 board that means 1 to 15. The 3×3 board goes up to 8, the 5×5 board to 24 and the 6×6 board to 35.

Pick a size and press Start. The clock does not run until your first move, so take a look at the board first. Every move counts one point for each tile that slides, so pushing three tiles in one click counts as three moves. When the last tile drops into place, the clock stops and the missing corner tile appears. You see your time and move count, and a badge if you set a new record.

Controls

A slide takes about a tenth of a second and never holds you up. If you press the next key during a slide, the slide finishes at once and your new move starts straight away.

Pause, colour hint and records

Pause stops the clock and hides the board, so you cannot plan your next moves for free. The game also pauses by itself when you switch to another tab. The colour hint is optional: it turns every tile that already sits in its final place green and adds a small check mark. It helps while you learn, and it does not change the score.

Your best time and your fewest moves are kept separately for each size, so a fast solve and a short solve can come from different games. Records and settings stay in your browser and are not uploaded.

Why every shuffle can be solved

Only half of all arrangements of the tiles can be reached by sliding. To tell the two halves apart, read the board row by row, skip the gap and count the inversions: pairs of tiles where a larger number comes before a smaller one.

even width: (inversions + gap row from bottom) is odd

Why? A sideways slide does not change the reading order. An up or down slide makes one tile jump over the width minus one other tiles. With an odd width that is an even number of jumps, so the parity of the inversions never changes. With an even width every vertical slide flips that parity and also moves the gap one row, so the sum stays odd. The game shuffles at random, and if the result lands in the impossible half it swaps two tiles, which always moves it into the solvable half. Then it slides the gap in from the edge, so any arrow key moves a tile on your first turn.

When the puzzle became a craze around 1880, a famous challenge asked players to fix a board with only 14 and 15 swapped. The prizes were safe: one swap flips the parity, so that position can never be solved.

Tips and strategy

Frequently asked questions

Is every board solvable?

Yes. The game checks the parity before you play and never gives you an impossible board.

Sources