We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Online Sliding Number Puzzle
If this tool helped you, you can buy us a coffee ☕
Play a sliding number puzzle online with solvable 3×3, 4×4, and 5×5 boards, move and time tracking, keyboard controls, and multi-step undo.
Tap a number next to the empty cell, or use the arrow keys to move the empty position.
Sliding Number Puzzle
Choose a board size and restore the shuffled numbers to ascending order.
Current board
4 × 4
Puzzle status
In progress
How to play
The sliding number puzzle, also known as the 15 puzzle, is a classic brain game in which numbered tiles move into an empty space. Your goal is to arrange every number in ascending order and return the empty space to the bottom-right corner. Choose from 3×3, 4×4, and 5×5 boards—the 8-puzzle, classic 15-puzzle, and 24-puzzle—and progress from an approachable starter grid to more advanced route planning.
Every new game starts from a completed board and shuffles it through a sequence of valid moves. This guarantees a solvable puzzle, so you will never encounter an arrangement that looks one move away but cannot be completed. The game tracks your moves and elapsed time in real time and clearly shows whether a puzzle is in progress or complete. Move tiles by clicking or tapping, using the arrow keys or WASD, or pressing the on-screen direction buttons. You can also undo multiple recent moves, reshuffle the current board size, or switch grid sizes at any time.
Find the empty space on the board. Only a numbered tile directly above, below, left, or right of it can move. Select an adjacent tile to slide it into the empty space, leaving its previous position empty. With keyboard controls, each direction moves the empty space—for example, pressing the Up Arrow swaps it with the tile above. The timer starts after your first valid move. Inputs that do not change the board are not counted. Once every tile is in order, the timer stops and your final move count and completion time are displayed.
Tiles must follow reading order: start with 1 in the top-left corner, increase from left to right across each row, and leave the final bottom-right position empty. On a 4×4 board, for example, the first three rows contain 1 through 12, while the last row contains 13, 14, 15, and the empty space. The puzzle is complete only when every position is correct. Changing the board size creates a new solvable puzzle and resets the timer, move count, and undo history so results from different grid sizes remain separate.
A reliable strategy is to complete the top row first, then work downward one row at a time. Near the end of each row, plan the final two tiles together to avoid disrupting sections you have already solved. The 3×3 board is ideal for learning how the empty space moves, the 4×4 board offers the classic challenge, and the 5×5 board requires longer-term planning. If you get stuck, bring the target tile into the correct row or column, then use a small loop to adjust its direction. Undo is useful for reviewing recent moves, but after a long rollback, reassessing the entire board is often more effective.
Not every random tile arrangement can be solved, so this game does not shuffle the numbers arbitrarily. Instead, it begins with a completed board and performs many valid random moves while avoiding repetitive back-and-forth swaps. Because each move can be reversed, every generated board has at least one path back to the solved state. Shuffle depth varies by board size, keeping smaller puzzles interesting while giving larger boards enough variety.
Puzzle generation, move validation, timing, and completion checks all run locally in your browser. Your board and move history are never uploaded. No account is required, and you can refresh the page or reshuffle whenever you like. The responsive board scales to fit your screen while keeping numbers clear, and controls include visible keyboard focus and accessible labels. Arrow keys are recommended for faster play on a computer, while touch devices support both tile taps and on-screen direction buttons—no precise dragging required.
If you are learning the rules, start with a 3×3 board and focus on the position of the empty space. Once comfortable, move up to 4×4 or 5×5. The Undo button can reverse multiple moves, making it easy to test different routes. Reshuffling clears your current progress and creates another solvable layout without retaining the previous time. The board also adjusts automatically when you zoom the browser without affecting tile order or completion detection.
During practice, break each puzzle into smaller goals, such as completing the first row and then the second, while avoiding tiles already in place. The timer is only for feedback and never limits your play time; the board will not change if you pause to think. For complex layouts, identify the rows and columns each target tile must cross, then plan a loop for the surrounding empty space. This is usually faster than making random moves.