Free classic games for your browser

Sliding Puzzle (15 Puzzle)

Slide tiles into the empty space until the numbers run in order, with the space in the bottom-right corner.

Loading 15 Puzzle…
A sliding puzzle is a game where numbered tiles sit on a square board with one empty space, and you slide tiles into that gap until every number is back in order. This online sliding tile puzzle lets you pick a 3×3, 4×4, 5×5 or 6×6 board and play right in your browser. The 4×4 size is the classic 15 puzzle, and it is the default. The game is free to use, and there are no accounts to create. You can play with the mouse, touch, swipe or keyboard, and you can ask for a hint when you get stuck. Every new game is a random shuffle that can always be solved. The board uses numbers only, with no pictures.

How to play the sliding puzzle online

  1. Open the Size select and choose a board. “4×4 (15 puzzle)” is the default.
  2. Choose a Colour option. “By row” gives each goal row its own colour. “Plain” uses one colour.
  3. Find a tile that sits in the same row or the same column as the empty space.
  4. Click or tap that tile. It and every tile between it and the space slide one step toward the space. Each tile that slides adds one to Moves.
  5. Or swipe anywhere on the board. The tile next to the space slides in the direction you swiped.
  6. For the keyboard, click the board first, then use the arrow keys or W, A, S and D. Under Arrow keys, pick “Move tile” (the default) or “Move space” to choose which way the arrow works.
  7. Press Hint to highlight the next tile to slide. The highlight shows the direction.
  8. Press Undo to step back one move at a time, or Restart to begin the same puzzle again.
  9. Press New game for a fresh shuffle. You are finished when the numbers are in order with the empty space in the bottom-right corner.

Keyboard shortcuts: U or Ctrl/Cmd+Z for undo, H for hint, N for new game, R for restart, E for Set up, F for fullscreen, and Esc to close a dialog. Copy the ?seed= link from the address bar to open the same puzzle again. Solve plays out a solution, but then the game sets no best scores.

What are the sliding puzzle rules?

A sliding puzzle is a square grid of numbered tiles with one empty space, and a tile can only move into that space. A tile can slide only from its own row or column into the gap. Here, one click can move a whole line of tiles at once. The goal is to place the numbers 1, 2, 3 and so on in order, row by row, with the empty space in the bottom-right corner. On the 4×4 board this is the 15 puzzle, which uses the numbers 1 to 15.

Why can some sliding puzzle shuffles never be solved?

Some arrangements of tiles cannot be solved at all. Count the inversions: pairs of numbered tiles where the larger number comes first when you read the board row by row, left to right. On a board with an odd width (3 or 5), the inversion count must be even. On a board with an even width (4 or 6), the inversion count plus the space’s row, counted from the bottom, must be odd.

Take the classic 4×4 “14-15 swap,” where tiles 14 and 15 are switched. It has 1 inversion, and the space is on row 1. The sum is 2, which is even, so the position can never be solved. Swapping those two tiles back fixes it. In the seed 123 puzzle on a 4×4 board, there are 61 inversions and the space is on row 4. The sum is 65, which is odd, so that puzzle is solvable. That is why every shuffle here is made solvable before you see it.

What are 15 puzzle tricks?

Before each move, look at which tiles share a row or column with the space. Those are your only options, so a short list of candidates keeps you from wandering. Try Undo when you are unsure. It costs nothing, and it lets you test an idea and step back if it makes things worse.

Remember that Moves counts tiles, not clicks. A click that slides three tiles adds three to the total. If you want a low count, favour moves that shift only one or two tiles. Also avoid undoing your own progress. If you slide a tile out of its correct place to reach another one, the detour usually adds moves.

What is a good 15 puzzle strategy?

A reliable plan is the row-by-row method. Place the top row first, then the left column, then the next row, and continue inwards. Once a tile is in place, try not to move it again. The last two tiles of a row are the tricky part: bring them in together, one beside the other, and turn them into place as a pair. When only a 3×3 corner is left, it works exactly like the 8 puzzle.

On the 3×3 board you can aim for the fewest moves: no 3×3 position needs more than 31. Use Hint after a few of your own moves to see whether your route is still on track.

How many moves does a sliding puzzle take to solve?

On a 3×3 board, the hardest shuffles need 31 moves. On a 4×4 board, the game searches for the shortest solution for up to 1.2 seconds. If it finds one, the hint says “Optimal.” If not, it uses the row-by-row plan, which is usually around 80 to 110 moves. For seed 1, row-by-row takes 79 moves, while the shortest solution takes 51. On 5×5 and 6×6 boards, hints always use the row-by-row plan, which is not necessarily the shortest.

Frequently asked questions

Is this sliding puzzle free, and do I need to sign up?

Yes, it is free to use. You do not need an account, and there is no sign-in step.

Can I play the sliding puzzle on a phone?

Yes. The board scales to fit the screen on phones as small as 320 pixels wide, with no sideways scrolling. Swipe across the board to slide tiles, or tap a tile in the empty space’s row or column.

Is my sliding puzzle game saved?

Yes, but only in your own browser. The game keeps one unfinished game for each board size, along with your settings and best scores. If you reload the page or switch sizes and back, your game picks up where you left it. Clearing your browser data removes it.

Can I share a sliding puzzle with someone else?

Yes. Copy the link from the address bar. It has a seed number and a size, and anyone who opens it gets the same puzzle. There is no Share button.

Why does the hint say “not necessarily the shortest”?

On 5×5 and 6×6 boards, and on 4×4 boards when the search takes too long, the hint uses a row-by-row plan. It is a correct route to the solution, but it may not be the shortest. The hint only says “Optimal” when the shortest route was actually computed.

Does the sliding tile puzzle game use pictures?

No. The board uses numbers only. The Colour option changes the tile colours, with “By row” giving each goal row its own colour.

Can I enter my own sliding block puzzle position?

Yes. Use Set up to fill in the board by tapping squares and numbers, or by typing the numbers row by row. The editor tells you whether the position can be solved and why. If it can, press Play this position. Games from your own position do not change your best scores.

More games

  • Klotski: another sliding block puzzle, but with pieces of different shapes.
  • Lights Out: a grid of lights where you toggle squares to switch them all off.
  • Tower of Hanoi: move a stack of discs between pegs, always placing smaller discs on larger ones.
  • 2048: slide numbered tiles together so that matching numbers merge.
  • Water Sort Puzzle: sort coloured liquids into tubes until each tube holds one colour.
  • Peg Solitaire: jump pegs over each other and remove them, aiming to leave just one.
  • Mahjong Solitaire: match pairs of tiles to clear the board.