Skip to main content

2048

Slide and merge tiles to reach 2048 on a classic 4x4 board.

Written by Golam Rabbani, Founder & Lead Engineer

Score: 0
2
4

Use arrow keys, WASD, on-screen buttons, or swipe to move tiles.

How to use this 2048

  1. Press an arrow key, WASD, an on-screen arrow, or swipe to slide all tiles in that direction.
  2. When two tiles with the same number collide they merge into one tile with their sum.
  3. A new 2 (or occasionally a 4) appears in a random empty cell after every valid move.
  4. Reach the 2048 tile to win — but the game keeps going until the board fills up with no legal moves.
  5. Press Restart at any time to clear the board and start a fresh game.

About this 2048

2048 is a sliding-tile puzzle where every move pushes the entire board in one direction and merges adjacent equal numbers. Each merge doubles the value (2+2 = 4, 4+4 = 8, and so on) and adds that value to your score. The challenge: the board only has 16 cells, so once the small tiles fill up faster than you can merge them away, the run is over.

The internal move logic compresses one row at a time. For "left", each row is filtered to non-zero values, scanned for adjacent duplicates that get merged into one, then padded with zeros on the right. The other three directions reuse the same code by rotating the grid before and after the operation, which keeps the merge rules identical and bug-free across directions.

For example: a row of [2, 2, 4, 0] swiped left becomes [4, 4, 0, 0] after the 2+2 merge, then on the next left swipe becomes [8, 0, 0, 0] — that single 8 is worth more than the original four tiles combined. The trick to high scores is keeping your biggest tile in one corner and feeding it from the same direction so the chain never breaks.

FAQ

How do I win 2048?
Pin your largest tile to a corner (most players use the top-left), only swipe in two directions whenever possible, and build a descending "snake" of values along the top row. Keep small numbers away from your big corner.
Does a 4 always spawn instead of a 2?
No — about 10% of the time a new tile is a 4 instead of a 2. That bonus tile can chain into bigger merges if you place it well, but it also fills the board faster.
Can I play 2048 on mobile?
Yes. Swipe in any direction on the board, or use the on-screen arrow buttons shown below the grid on small screens.
When does the game end?
When the board is full and no two adjacent tiles share a value. At that point there is no legal merge in any direction and the score is locked in.
What is the highest possible tile?
In theory 131,072 on a 4x4 board, but in practice almost nobody gets past 8192. Reaching 4096 is already an excellent run.
Is the game free?
Yes — free, no signup, runs entirely in your browser.