Snake

Play the classic Snake game entirely in your browser. Use the arrow keys or on-screen controls to guide the snake, eat food, and grow longer. No server, no network, no uploads — 100% client-side Vanilla JS on Canvas.

Score: 0
Best: 0
Press Start to play. Arrow keys to move.
100% client-side · no network · Canvas API
Reserved for AdSense (Horizontal)

Use Cases

Snake is a timeless browser game that sharpens reflexes, hand-eye coordination, and forward planning. Players guide a growing snake around a confined grid, eating food to lengthen its body while avoiding collisions with the walls and its own tail. It is a popular quick-break diversion for developers, students, and casual gamers who want a fast, keyboard- or touch-friendly challenge with no downloads, no accounts, and no network requests.

Because Snake runs entirely in the browser on the HTML5 Canvas API, it works offline, protects privacy by keeping all state local (high score is stored only in your browser's localStorage), and loads instantly on mobile and desktop alike.

How to Play Snake

  • Objective: Guide the snake to eat food that appears on the grid. Each piece of food makes the snake grow longer and increases your score by 10 points. Survive as long as possible to achieve the highest score.
  • Keyboard controls: Use the Arrow Up, Arrow Down, Arrow Left, and Arrow Right keys to change the snake's direction. The snake cannot reverse directly into itself (for example, you cannot turn left while moving right).
  • Touch controls: Tap the on-screen directional buttons (▲, ◀, ▼, ▶) or swipe across the game canvas to steer the snake in the desired direction.
  • Rules: Do not let the snake hit the outer walls of the grid, and do not let the snake's head touch any part of its own body. Either collision ends the game immediately.
  • Game over: When the game ends, your final score is shown. If it beats your previous best, the new high score is saved to your browser. Press Start Game to begin a new round.

Snake is a 100% client-side game built with Vanilla JS and the Canvas API. No server, no network, no uploads — play it anywhere, anytime, entirely offline.

Frequently Asked Questions