PuzzleLast reviewed

2048 Puzzle

This is the classic 2048 puzzle: a 4×4 board, tiles that slide together and merge into double their value, and the goal of building a 2048 tile. The rules are simple, but a few details of how this version works, like how often a 4 appears and what undo restores, change how you should play.

2048 Puzzle

2048 Puzzle

Browser-native HTML5 game. No downloads or installations required.

How to play 2048 Puzzle

  1. Click or tap the board first so it has keyboard focus, then slide the tiles with the arrow keys, W A S D, a swipe, or the on-screen arrow buttons.
  2. Every tile slides as far as it can in that direction, stopping at the edge or at another tile.
  3. Two tiles with the same number that collide merge into one tile with double the value. Each tile can merge only once per move, and merges happen starting from the side you are sliding toward.
  4. After every move that changes the board, one new tile appears in a random empty cell: a 2 nine times out of ten, otherwise a 4.
  5. Build a 2048 tile to win. You can then choose Keep Playing to chase a higher tile, or start a new game.
  6. The game ends when the board is full and no two neighbouring tiles match.

Controls

Keyboard and mouse

Arrow keys or W A S D move all tiles. Click the board (or Tab to it) first. Buttons below the board: New Game, Undo, Pause and Sound.

Touchscreen

Swipe across the board in the direction you want to move. A swipe shorter than 24 pixels is ignored, so small finger movements don't trigger a move. The arrow buttons below the board also work.

Difficulty, in numbers

SettingWhat changesValues from the code
New tileValue of the tile added after each move that changes the board.2 (90%) or 4 (10%)
ScoreEach merge adds the value of the tile it creates. Slides without a merge add nothing.Two 8s → 16 → +16
UndoRestores the board, score, move count and win count to before your last move.1 move
WinShown once, when a tile reaches 2048. You can keep playing afterwards.2048 tile
Highest tile the game will saveSaved boards are checked before loading; tile values above this are rejected.131,072

2048 has no difficulty setting. The table shows the fixed rules of this version, read from its code.

Tips

These tips follow from how the game's rules and numbers work.

  • Keep your highest tile in one corner, for example bottom-left, and avoid the one direction that would pull it out.
  • Build a descending chain along one edge, such as 256, 128, 64, 32, so that one merge sets up the next.
  • Use two or three directions most of the time and the fourth only when nothing else moves. The game ignores moves that change nothing, so a stuck direction costs nothing to try.
  • Merge 2s and 4s early. One new tile in ten is a 4, and stray small tiles behind big ones are the most common way a board locks up.
  • Save Undo for real mistakes. It only goes back one move, so it cannot rescue a position that went wrong several moves ago.

Developer notes

A small, pure game core

The rules of this 2048 live in a few plain functions that take a board and return a new one, with no drawing code mixed in. The board is a list of tiles, each with a value, a row and a column. A move works one row (or column) at a time:

// for each line, walk tiles from the side you're sliding toward
for (const tile of line) {
  if (last && !last.merged && last.value === tile.value) {
    last.value *= 2; last.merged = true;   // merge once per move
    score += last.value;
  } else {
    place(tile, nextFreeCell++);
    last = tile;
  }
}

That is a simplified version of the game's code. Starting from the far side and marking merged tiles is what makes [2, 2, 2, 2] become [4, 4] and not [8], and makes [4, 2, 2] become [4, 4] rather than a single 8.

If a move changes nothing, it is thrown away: no new tile, no move counted, no score.

Randomness

New tiles go in a random empty cell, and are 2s with probability 0.9 and 4s with 0.1. The random number function is passed into the game core as a parameter, so a fixed sequence of tiles can be replayed exactly.

Undo, saving and checking saves

Undo keeps exactly one previous state, including the best score and win count, so undoing the move that reached 2048 also undoes the win. The current board, best score, statistics (games, wins, moves, merges) and sound setting are saved in your browser after every move. When the page loads, the saved board is validated before use: at most 16 tiles, no two in the same cell, every value a power of two between 2 and 131,072, and a "won" flag only if a 2048 tile exists. A damaged save starts a fresh game instead of breaking the page.

Accessibility

The board has a text description that lists every row, so screen readers can follow the game, and each move is announced ("Moved left. Score 432."). Sounds are short generated tones (300 Hz for a slide, 520 Hz for a merge) rather than audio files, and can be turned off.

Screenshots

2048 board mid-game with a 64 tile in the bottom row and a score of 432
A board after about 60 moves, score 432. The 64 sits on the bottom edge with smaller tiles stacked above.

Questions

What is the objective of 2048?

Merge matching tiles on a 4×4 board until you make a tile numbered 2048. After that you can keep playing for a higher tile and score.

How is the score calculated?

Each merge adds the value of the tile it creates, so merging two 8s adds 16. Moves without a merge add nothing, and there are no time bonuses.

Can I undo a move?

Yes, one move. Undo restores the board, score, move count and win count to how they were before your last move.

Does the game save my progress?

Yes, in this browser on this device: your current board, best score, statistics and sound setting. Clearing site data or using a private window removes them.

Guides for 2048 Puzzle

Guide · 2048 Puzzle

2048 Strategy: Why the Corner Method Works, With the Numbers

A 2048 guide built on this version's actual rules: how merges resolve, why a 4 appears one time in ten, what a 2048 tile costs in moves and score, and how to use the corner method and the one-step undo.

· 3 min read

Other games

Chessvion

Chess in your browser against ten levels of the Stockfish 19 engine, with 117 puzzles, 7 lessons, endgame drills and an opening explorer.

StrategyPlay Now

Skyline Scramble

Endless rooftop runner: jump barriers and gaps, slide under signs and drones, and collect coins while the city speeds up around you.

ArcadePlay Now