Guide · Open source
How to use 2048: play online, clone and run the code
Updated · written with AI from the project's own documentation and checked against our catalogue data
2048 is a number puzzle where you slide tiles together to build a 2048 tile. This guide covers two ways to use it: playing the game in a browser, and working with the open-source JavaScript code in the gabrielecirulli/2048 repository. By the end you will know where to play, how to get the source onto your machine, and what the project does and does not offer.
Quick start
- 1Play in the browser. Open play2048.co to play the game immediately without installing anything.
- 2Clone the repository. Run git clone https://github.com/gabrielecirulli/2048.git in a terminal to get the source code.
- 3Read the code. Open the cloned files and study the JavaScript game logic and swipe handling.
- 4Check the licence. Read the MIT license file in the repository before reusing any code.
- 5Make a change on a branch. If you modify the code, create a specific branch rather than editing master.
- 6Test before contributing. Confirm the game fully works, then open a pull request into master as described in the README.
What is the 2048 game and where can you play it?
2048 is a number puzzle game. You slide tiles together to build a 2048 tile. The source README describes it as a small clone of the mobile game 1024, based on Saming's 2048, which is also a clone, and it was indirectly inspired by Threes.
The author hosts the game in a browser at play2048.co, so you can play without installing anything. The official app is also listed on the Google Play Store and the Apple App Store.
Get the 2048 source code with git clone
If you want the code rather than just the game, clone the repository. The README gives this command:
- The repository is licensed under MIT, so you can read, reuse and modify it.
- The README lists no prerequisites and no build steps, so check the files in the repository for how to open the game locally.
git clone https://github.com/gabrielecirulli/2048.gitPlay and learn from the code
The project is a short, self-contained browser game written in JavaScript. It is a useful size for reading how simple game logic and mobile swipe handling can be built. The README credits contributors for specific pieces: TimPetricola added best score storage, chrisprice added custom code for swipe handling on mobile, marcingajda made swipes work on Windows Phone, and mgarciaisaia added support for Android 2.3.
- Look at how tile movement and merging are handled in the game logic.
- Compare the swipe handling code to see how touch input is supported on mobile.
- Check how the best score is stored between sessions.
Fork the project as a starting point
The README invites changes: you can fork the repository and open a pull request. It asks contributors to make changes in a specific branch and to request a pull into master. It also asks that the game fully works before a pull request is sent. The full process is in the CONTRIBUTING.md file in the repository.
- Create a branch for your change rather than working on master.
- Test that the game fully works before opening a pull request.
- Read CONTRIBUTING.md before submitting.
Know the limits of this project
The README says the game was made just for fun. It publishes no release and the last push was in October 2024. The README does not describe a game engine or tooling beyond the game itself, so it is not a framework for production games. Maintainers are Anna Harren and sigod.
What people use it for
- Playing 2048 in a browser without installing anything.
- Studying a small JavaScript browser game to learn basic game logic.
- Learning how mobile swipe input can be handled in web code.
- Forking the short, self-contained game as a starting point for your own project.
Frequently asked questions
How do I install 2048?
The README gives one install command: git clone https://github.com/gabrielecirulli/2048.git. To just play, you do not need to install anything; open play2048.co in a browser. The README does not list build steps, so check the repository files for how to run it locally.
Is 2048 free to use?
The code is licensed under the MIT license, which lets anyone read, reuse and modify it. The README asks for no payment to play, though it mentions an optional donation to the author.
What are the requirements to run 2048?
The README lists no prerequisites. Since the game is a browser game written in JavaScript, playing it on the hosted site only needs a web browser. Running the code locally is not described in the README beyond cloning it.
Is there an app version of 2048?
Yes. The README links to an official app on the Google Play Store and another on the Apple App Store. The app listings are separate from the source code in this repository.
What are good alternatives to 2048?
The README names Threes as an inspiration for 2048 and 1024 as the mobile game it clones. These are the comparable projects for people who want a similar sliding tile puzzle.
Can I use 2048 for a large game project?
The README describes the project as made just for fun, with no release published, and does not describe an engine or tooling. It is better suited to learning or small forks than to production-grade game development.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use 2048 if you want to play the puzzle in a browser or study a short, readable JavaScript game under the MIT license. Pick something else if you need a large, actively developed framework or a production game engine, since the README describes this project as made just for fun.
Install options & downloads