Skip to the game
Tic Tac Toe

Snake

Steer a growing snake around a 20×20 board in eight modes, from classic Snake to mazes, portals, and poison, or race the computer or a friend on the same device.

Play Snake

Game mode
Score
0
Best
0
Length
4

Loading the game…

Classic Snake

Eat apples to grow. Don't hit the walls or your own tail.

or press an arrow key

Steer with the arrow keys or WASD, or swipe the board. P or Space pauses, and R restarts.

Game settings
Changing the mode, speed, edges, or computer starts a new game.
Speed
Edges
Snake color

With two snakes, the other one takes the next color.

Best scoresNormal speed, walls.
Classic–
Maze–
Portals–
Poison–
Time attack–
Zen–
Vs computer–

How it works

How to play the Snake game

Pick a mode, then turn left or right as the snake slides one square at a time, eat the apples, and keep the head away from anything solid.

  1. Step 01

    Pick a mode

    Choose one of the eight modes above the board, then set the speed, the edges, and, against the computer, how strong it plays.
  2. Step 02

    Start and steer

    Press Play, tap the board, or press an arrow key. Turn with the arrow keys or WASD, a swipe, or the direction pad. With 2 players, player 1 has WASD and player 2 the arrows.
  3. Step 03

    Eat and stay alive

    A red apple is worth 1 point and a segment, a golden one 5. Keep clear of the walls, stone blocks, poison apples, and every snake's body.

Features

Eight ways to play Snake on one board

  • Eight modes

    Classic, Maze, Portals, Poison, Time attack, Zen, Vs computer, and 2 players, all on the same 20×20 board.

  • A computer rival

    Race a computer snake for the apples on Easy, Medium, or Hard. It plans a path and tries not to box itself in.

  • Two players, one device

    Share a keyboard, WASD against the arrow keys, or a touch screen with a pad and half the board for each player.

  • Mazes, portals, and poison

    Four stone-block mazes, two pairs of portals that move every game, and poison apples that fade away.

  • Smooth and quick

    Three speeds, a snake that glides between squares, and up to three quick turns remembered in order.

  • Best scores for every mode

    A best score for each mode, speed, and edge setting, plus your record against each computer level, kept in your browser.

Strategy

Snake game tips for every mode

Long snakes die from running out of room, not from missing apples. Plan your space, and with two snakes, watch the other head.

  • Move in wide loops

    Sweep back and forth across the board in big S-shapes. It keeps your body in tidy rows and leaves open space ahead.

  • Always leave an exit

    Before you turn into a gap, make sure there's a way out. Pockets with one opening, common in the mazes, are where long snakes get trapped.

  • Follow your tail

    The square your tail is leaving is always empty on the same move, so following your own tail is a safe way to wait for a better path.

  • Queue tight turns

    The game remembers up to three turns, so two quick presses, such as up then left, make a clean U-turn even at Fast speed.

  • Golden apples buy time

    In Time attack, each golden apple adds 5 seconds as well as 5 points, so it's usually worth the detour that a red apple isn't.

  • Mind the other head

    Against the computer or a friend, two heads meeting crash together. Take the apple you're closer to, and steer across the other snake's path, not into it.

About the game

The Snake game: rules, eight modes, and the math of a full board

The rules, every mode from Maze to 2 players, the computer's three levels, speeds, controls, the math of a full board, and where Snake came from.

Snake is the classic arcade game where you steer a growing line around the screen, eat food, and try not to crash. This version keeps the classic rules and adds seven more ways to play, from stone mazes and portals to a computer rival and a friend on the same device.

Snake game rules: eat, grow, survive

The snake moves one square at a time on a board of 20 by 20 squares, and it never stops. You choose when it turns, left or right, since it can't reverse into its own neck. It starts four segments long in the middle of the board. Eat a red apple and it grows one segment and scores a point, and a new apple appears on a random empty square. Every fifth apple also brings a golden one, worth 5 points, that disappears after 45 moves.

With Walls on, touching an edge ends the game; with Wrap, the snake comes out on the opposite side. Running into any part of a body ends it too, but the tail moves out of the way as you go, so the square it's leaving is always safe.

Eight ways to play the Snake game

Pick a mode in the row above the board. Each one keeps its own best scores.

  • Classic: the rules above, nothing added.
  • Maze: stone blocks in one of four layouts, called Pillars, Box, Brackets, and Gates.
  • Portals: two pairs of glowing rings that link distant squares.
  • Poison: every apple you eat leaves a poison apple somewhere else.
  • Time attack: score as much as you can in 60 seconds.
  • Zen: no walls and no game over.
  • Vs computer: race a computer snake for the apples.
  • 2 players: two snakes, two people, one keyboard or screen.

Maze, Portals, and Poison

In Maze, a stone block ends the game just like a wall. The middle rows are always clear where the snake starts, and after each game the next of the four mazes comes up, while Restart keeps the one you're on.

In Portals, steer the head into a ring and it comes out of the ring of the same color, still heading the same way, with the body following through. The two pairs move to new spots every game, never against an edge or on the starting row.

In Poison, each red apple you eat drops a purple poison apple at least four squares from your head. Touch one and the game ends. Poison apples don't stay forever: each lasts 80 moves, blinks for the last 16, and then fades, with at most eight on the board at once.

Time attack and Zen

Time attack plays by the classic rules against a 60-second clock, shown where the length usually is. Each golden apple adds 5 seconds, the clock turns red for the last 10, and it stops while the game is paused. Crashing still ends the run early.

Zen is the calm one. The edges always wrap, there are no golden apples, and nothing ends the game. Bite your own body and the snake loses everything from that point back to the tail, along with a point for every segment lost. Your best Zen score is saved the moment you beat it.

Two-player Snake: the computer or a friend

Vs computer and 2 players put two snakes and two apples on the board. After a 3, 2, 1 countdown, one snake starts in the top left heading right and the other in the bottom right heading left. The first snake to crash, into a wall, either body, or the other head, loses the round. If both crash on the same move, or the board fills up, the higher score wins, and equal scores are a draw. The same first-to-crash rule decided the very first snake game in 1976.

The computer has three levels. Easy heads straight for the nearest apple and often takes a random turn, so it boxes itself in. Medium finds the shortest open path to an apple, avoids pockets that are too small for it, and keeps out of squares your head could reach next. Hard never turns at random, only takes paths that leave room for its whole body, and leaves an apple to you when you're clearly closer. Your wins and losses at each level are saved.

With 2 players, player 1 steers with WASD and player 2 with the arrow keys. On a touch screen, each player swipes on their own half of the board, and phones show a direction pad for each player. The round count above the board starts again when you leave the mode.

Slow, Normal, and Fast

Under Speed, choose how fast the snake starts. It gets 2 milliseconds quicker per move with each red apple, until it reaches a limit: Slow goes from 165 to 115 milliseconds a move, Normal from 125 to 80, and Fast from 90 to 58, about 17 squares a second. With two snakes, the apples are shared out, so a round speeds up at the same pace as a game on your own.

Steering with keys, swipes, or the pad

Arrow keys or W, A, S, and D turn the snake. P or Space pauses and resumes, R restarts, and Enter starts a new game. On a touch screen, swipe on the board to turn, with another turn for every 18 pixels of travel, or use the direction pad that appears under the board on narrower screens.

Turns are queued, up to three at a time, and each is checked against the one before it, so up then left makes a clean U-turn. The game pauses by itself when you switch tabs or apps, leave the window, or scroll the board half off screen. Under Snake color, pick from four colors; with two snakes, the other one takes the next color along.

The math of filling the board

In Classic, the snake starts 4 squares long on a 400-square board, so a win takes about 396 more segments, one for each apple of either color. Catch every golden apple and the board fills after about 330 red apples and 66 golden ones, for roughly 660 points. When no empty square is left for a new apple, the game ends with You win!

Because the board has an even number of squares, there's a closed route through every square that returns to its start. A snake that follows such a loop never runs into itself, since its head always moves onto a square the tail has just left. It's slow, but it's why sweeping the board in tidy rows works once the snake gets long. For a maze chase with ghosts instead, try Maze Muncher.

From Blockade in 1976 to the Nokia 6110

Snake games began in the arcades with Blockade, released by Gremlin Industries in 1976, in which two players steered lines that grew behind them. Blockade and its early copies were abstract and didn't call anything a snake. Home computer games followed, such as Snake Byte in 1982.

The version many people remember came on Nokia phones. Taneli Armanto programmed Snake for the Nokia 6110, which Nokia announced in December 1997 and sold from 1998. In 2012 the Museum of Modern Art in New York announced it would add Snake to its collection of video games. This version is written from scratch and isn't affiliated with Nokia.

What's saved on this device

There's no sign-up or account, and the page needs a connection only to load. Your settings, your best score for each mode, speed, and edge setting, and your record against the computer are kept in your browser's local storage, and Reset best scores clears them. A game in progress isn't saved. The privacy policy lists every stored item.

Want something slower? Try 2048 or Block Drop.

FAQ

Snake game questions

Quick answers about the Snake game: the modes, two players, the computer, golden apples, speeds, and winning.

How do you play the Snake game?

Pick a mode, then steer the snake with the arrow keys, WASD, swipes, or the direction pad. Eat apples to grow and score, and avoid the walls and every snake's body. Fill the whole board to win.

What modes are there?

Eight: Classic, Maze with four layouts, Portals, Poison, a 60-second Time attack, Zen with no game over, Vs computer, and 2 players on one device.

Can two people play Snake together?

Yes, on the same device. Player 1 steers with WASD and player 2 with the arrow keys, or on a touch screen each player swipes on their own half of the board or uses their own pad. There's no online play.

How good is the computer snake?

That depends on the level. Easy goes straight for the nearest apple and often turns at random. Medium follows the shortest safe path. Hard never turns at random and only takes paths that leave room for its whole body.

What do golden apples do?

They're worth 5 points instead of 1 and add a segment like a red apple. One appears with every fifth red apple and vanishes after 45 moves. In Time attack, each one also adds 5 seconds to the clock.

What happens in Zen mode?

Nothing ends the game. The edges always wrap, and biting your own body cuts the snake off at that point, taking a point away for each segment lost.

Does the snake speed up?

Yes. Each red apple makes every move 2 milliseconds quicker, up to a limit: 115 milliseconds a move on Slow, 80 on Normal, and 58 on Fast.

What's the difference between Walls and Wrap?

With Walls, touching the edge ends the game. With Wrap, the snake passes through the edge and appears on the opposite side. Each setting keeps its own best scores.

Is Snake unblocked at school?

That's up to the school. Snake here is one ordinary web page with a drawn board and no plug-in, and whether it opens depends on the filter each school or work network chooses.

Can you win at Snake?

Yes. On your own, fill all 400 squares of the board and the game ends with "You win!" Against the computer or a friend, the snake that doesn't crash wins the round.