Sliding Puzzle
PuzzleHow to play
Slide the numbered tiles one at a time into the empty gap until every number is back in order, ending with the gap in the bottom-right. Use the arrow keys or tap a tile beside the gap. Pick 3x3, 4x4 or 5x5, and try to solve it in the fewest moves.
Controls
Keyboard: Arrow keys (or WASD) slide the tile next to the gap. Touch: tap any tile in the same row or column as the gap to slide it.
What is the Sliding Puzzle?
The Sliding Puzzle is the classic tile-sliding brain teaser, the one most people first met as the pocket-sized “15-puzzle”. You are given a square grid filled with numbered tiles and a single empty gap. The tiles begin scrambled, and your only job is to slide them, one at a time, until every number rests in order — from the top-left corner, reading left to right and top to bottom, all the way down to the final tile, with the empty gap settling into the bottom-right square. That is the whole goal, and it is entirely a test of logic and planning. There is no hidden luck, no chance element, and nothing to guess. Every arrangement you can reach is the direct result of the slides you chose to make.
This version runs right in your browser, free, with no account and nothing to install. It offers three board sizes and quietly tracks two things while you play: how many moves you have made and how much time has passed. When you finish, your fewest-moves result for that board size is saved on your own device so you always have a personal target to beat. It is a calm, self-paced puzzle you can pick up for two minutes or lose an hour to, and it rewards careful thinking rather than fast fingers.
Is the puzzle always solvable?
Yes — and this matters more than it sounds. If you take a sliding puzzle and drop the tiles into a completely random order, there is roughly a one-in-two chance the arrangement is mathematically impossible to solve, no matter how clever you are. That is a genuine property of the puzzle, not a bug. To avoid ever handing you an unsolvable board, this version never generates a random arrangement. Instead it starts from the finished, solved position and then performs a long sequence of legal single-tile slides — a couple of hundred of them — to scramble it. Because every one of those scrambling slides is a move you could legally make, the whole thing can always be un-done. In other words, a solution is guaranteed to exist for every puzzle you are ever given. The only question is how efficiently you find it.
How to play, step by step
The core rule is simple: only a tile directly next to the empty gap can move, and when it moves it slides into that gap, leaving a new gap where it used to be. You never lift or swap tiles freely; you only ever slide them into the one open space. Everything else is a consequence of that single rule.
Choosing your board size
Before you start, pick the grid you want to play:
- 3×3 — eight numbered tiles and one gap. This is the gentle warm-up and the perfect place to learn the solving method.
- 4×4 — fifteen tiles and one gap. This is the traditional 15-puzzle, the default size, and the one most people picture.
- 5×5 — twenty-four tiles and one gap. A serious test that rewards a solid, repeatable technique.
Each size keeps its own separate fewest-moves record, so improving on the 3×3 does not overwrite your 4×4 best. You are always competing against your past self on that exact board.
Playing with a keyboard
On a computer, the arrow keys (or the equivalent WASD keys) do everything. A key slides the tile that is next to the gap in that direction into the gap. It is worth reading the direction the way the game means it: pressing Up slides the tile below the gap upward into the space; pressing Down slides the tile above the gap downward; Left and Right work the same way across a row. If you think in terms of “which tile do I want to pull into the empty square”, the keys quickly become second nature. If no tile can move in the direction you press — because the gap is against that edge — nothing happens and no move is counted.
Playing on a phone or tablet
Touch play is designed to feel natural. Tap any tile that shares a row or a column with the gap, and the whole run of tiles between your finger and the gap slides across together to fill it. That means you can move several tiles with a single tap when they line up, which is faster than nudging them one by one. You can also swipe in a direction to slide a single neighbouring tile, exactly like the arrow keys. Tiles that can currently move are gently highlighted, so even on a small screen it is easy to see your options.
Reading the board and the counters
As you play, the move counter climbs and a timer ticks upward. The timer does not start until your very first move, so there is no pressure while you study the opening scramble — take as long as you like to plan before you touch a tile. When you slide a run of several tiles at once with a tap, each tile that shifts counts as one move, which keeps the move count honest and comparable however you play. When the board is finally in order, a “Solved” message appears with your move total and your time, and a button to play again.
How the difficulty sizes change the game
The three sizes are not just bigger versions of the same task — they change how you have to think.
On the 3×3, the board is small enough that you can almost see the whole solution at once. Mistakes are cheap because there is so little to undo, which makes it the ideal training ground. This is where you should learn the corner technique described below, because the same technique scales up unchanged to the larger boards.
The 4×4 is the sweet spot. It is big enough that you cannot brute-force it by fiddling, so a real method pays off, but small enough that a clean solve feels quick and satisfying. Most players settle here once the technique clicks.
The 5×5 is where discipline matters most. With twenty-four tiles, disorganised poking will leave you going in circles for a long time. The row-by-row and column-by-column approach turns an intimidating board into a series of small, familiar sub-puzzles. It also punishes wasted moves, so it is the best size for chasing an efficient, low-move solve.
A reliable solving method
The single biggest jump in skill comes from switching off the urge to solve every tile at once and instead locking tiles into place in a fixed order, so that solved regions stay solved. Here is the method that always works.
Solve the top row first
Ignore the rest of the board and place the top row in order: get tile 1 into the top-left, then tile 2 next to it, and so on. Bring each tile roughly toward its home by manoeuvring the gap around it, then nudging it a step at a time. Do not worry yet about the chaos you are creating lower down — those tiles are not solved, so disturbing them costs you nothing.
The corner trick for the last two tiles of a row
The end of each row is the part that traps beginners, because placing the final tile of a row naively will kick out the one you just placed. The fix is to handle the last two tiles of the row as a pair. Position them together in an L-shape near the row’s end corner — the second-to-last tile in the corner square and the last tile just beneath it — then rotate the pair into their final spots in one motion. Done this way, the two tiles slot in together and lock the whole row without disturbing anything to the left.
Work down, row by row
Once the top row is finished, treat it as a wall you never touch again, and solve the next row down using exactly the same approach, corner trick included. Keep going until only the bottom two rows remain unsolved. At that point you stop solving by rows.
Finish the bottom two rows by columns
The last two rows have to be solved together, column by column, because trying to complete either row alone will always break the other. Fix the leftmost column of the bottom two rows as a vertical pair, then the next column to its right, and continue left to right. Each pair, like the row corners, is placed as a unit and rotated home.
The final two-by-two block
Eventually you are left with a small two-by-two block in the bottom-right containing three loose tiles and the gap. This block is solved purely by rotating those three tiles around the gap, cycling them until they fall into order. If they simply will not resolve after a full cycle, it is a strong sign an earlier region was placed slightly wrong — but on a guaranteed-solvable board, a correctly built board always finishes here.
Strategy: from beginner to advanced
Beginner: master the gap, not the tiles
New players instinctively focus on the tile they want to move. The faster mindset is to focus on the gap. The gap is the only thing that actually moves under your control; tiles only shift because the gap travelled past them. Practise steering the gap on a loop around a tile without disturbing anything else — this “orbit” is the fundamental manoeuvre behind every advanced trick. On the 3×3, spend a few solves doing nothing but moving the gap deliberately, and the rest of the game opens up.
Intermediate: keep the gap where the work is
A well-placed gap saves enormous numbers of moves. When you are solving the top row, keep the gap up near the top so it is ready to help. When you drop to a lower row, bring the gap down with you. Chasing a gap that is stranded on the far side of the board wastes slides on nothing but travel. Before you commit to positioning a tile, glance at where the gap is and route it the short way.
Intermediate: plan two or three slides ahead
The most common source of a bloated move count is nudging a tile forward, realising it went the wrong way, and nudging it back. Before you start moving a tile, picture the two or three slides it will take to seat it and confirm they will not eject a tile you have already placed. A few seconds of looking ahead routinely saves a dozen slides.
Advanced: solve for fewest moves, not fastest hands
Once the method is automatic, the real depth is in efficiency. Because the timer is generous and pressure-free, the interesting challenge is beating your own fewest-moves record for a size. Look for tiles that are already close to home and place them with minimal disturbance. Prefer tap-slides that move several tiles at once when they legitimately shorten the path. Notice when two out-of-place tiles can be corrected by the same short cycle of the gap. Efficiency, not speed, is what turns a good solve into a great one.
Advanced: recognise the near-finished shapes
Experienced solvers stop calculating and start recognising. The L-shaped pair before a corner rotation, the three-tile cycle of the final block, the single-tile “orbit” around a fixed tile — these become shapes you spot instantly and execute without thinking. Building that library of shapes is what lets strong players glide through a 5×5 that would leave a beginner stuck.
Common mistakes and how to fix them
- Solving the last tile of a row directly. It kicks out the previous tile every time. Fix: always use the corner-pair trick for the last two tiles of a row.
- Trying to finish one of the bottom two rows on its own. The bottom two rows are a single sub-puzzle solved by columns. Fix: switch from rows to column-pairs as soon as only two rows remain.
- Disturbing solved regions. Once a row or column is locked, route the gap around it, never through it. Fix: treat solved tiles as walls.
- Ping-ponging a tile back and forth. This is pure wasted moves. Fix: look ahead two or three slides before you start moving a tile.
- Letting the gap wander. A gap parked far from your work area costs travel moves. Fix: keep the gap near the tiles you are currently placing.
Scoring and beating your best
Scoring here is refreshingly honest: your score is simply the number of moves it took you to solve the board, and lower is better. The elapsed time is shown too, but the record that is saved is your fewest moves for each size. That best is stored locally on the device you are playing on — there is no login, no leaderboard, and nothing is uploaded anywhere. If you play on a different device or clear your browser data, you simply start a fresh record.
To lower your best, keep the whole method intact but hunt for waste: fewer corrections, shorter gap routes, and tap-slides that legitimately move several tiles toward home at once. Because each puzzle is a fresh scramble, no two solves are identical, so a strong record is one you earned across many boards rather than a single lucky layout. That is exactly what makes chasing it satisfying — the improvement is real skill, not chance.
A short history of the puzzle
The numbered sliding puzzle became a genuine craze in the late nineteenth century, when the 4×4 “15-puzzle” spread rapidly as a cheap, pocketable toy. Its lasting fame is partly mathematical: it is the puzzle that made ordinary people bump into the idea that some arrangements are reachable and some are not, decades before most had heard the word “permutation”. That is precisely why this version scrambles by making legal moves from the solved state rather than dropping tiles at random — it sidesteps the impossible half of the arrangements entirely. You do not need any of that theory to enjoy the game, but it is a nice reminder that a toy this simple sits on top of some surprisingly deep ideas, and that the method you learn here is the same one enthusiasts have used for generations.
A warm-up routine that builds real skill
If you want to improve quickly, treat your first few boards of a session as deliberate practice rather than a race. Play a 3×3 and narrate each step to yourself: “top row first, corner pair for tiles two and three, then the bottom two rows by columns, then the final block.” Doing this two or three times cements the order of operations so that on larger boards you never have to stop and wonder what to solve next. Then step up to a 4×4 and focus on a single habit — keeping the gap near your work — for the whole solve. Isolating one skill at a time is far more effective than trying to fix everything at once, and within a handful of sessions the whole method starts to feel automatic. Only after the method is second nature should you begin pushing hard for a low move count, because efficiency is a refinement of good technique, not a substitute for it.
Is this gambling?
No. The Sliding Puzzle is a free skill game and a pure logic exercise. There is no money involved of any kind, nothing to purchase, no accounts, and no chance-based reward — every outcome is decided entirely by the moves you choose. The one place “luck” seems to appear is the starting scramble, and even that is not really luck: it is just a randomised but always-solvable arrangement, so success comes from your reasoning, not from a roll of the dice. You cannot lose anything and there is nothing to chase but your own personal best.
Accessibility
The puzzle is built to be played comfortably in more than one way:
- Full keyboard play. The entire game is playable with the arrow keys (or WASD), and tiles receive a clear focus outline so you always know what has keyboard focus.
- Screen-reader labels. The board is marked up as a grid and each tile is labelled with its number, and status messages announce new puzzles and solves.
- Reduced motion. If your device is set to prefer reduced motion, the sliding animation is switched off and tiles simply update in place, which is calmer and can be easier to track.
- Not colour-dependent. Every tile shows its number, so you never have to rely on colour to tell tiles apart, and movable tiles are indicated with an outline as well as their position.
Tips for mobile and older phones
The puzzle is light and runs smoothly even on modest hardware, but a few habits help on a small screen. Use the multi-tile tap-slide whenever tiles line up with the gap — it is faster and more accurate than swiping single tiles on a cramped board. Start on the 3×3 or 4×4 on a phone; the 5×5 tiles get small and are more comfortable on a tablet or larger display. If animations ever feel busy on an older device, enabling your system’s reduced-motion setting removes the tile transitions entirely for a crisper, lighter experience. And because the timer only starts on your first move, you can safely set the phone down mid-thought without wrecking a “time” that does not affect your saved record anyway.
Where to go next
If you enjoy the ordered-thinking feel of sliding tiles, try Merge 2048, which also lives on a grid and rewards planning your slides ahead. For another calm logic challenge, Memory Match trains pattern recall, while Minesweeper scratches the same deductive itch. And when you want to go deeper on technique, our guide Sliding Puzzle: solving the 4×4 row by row walks through the exact method above in careful, worked detail.
A friendly closing word
The Sliding Puzzle has stayed popular for well over a century because it is honest: it never cheats you, it never relies on luck, and every solve is something you genuinely worked out. Start on the 3×3, learn the corner trick until it feels automatic, then carry the same method up to the 4×4 and 5×5. Watch your move counts fall as your planning sharpens, and enjoy the quiet satisfaction of a scrambled board clicking back into perfect order. Take your time, think a move ahead, and have fun.