Snake Game

Play the classic arcade Snake game in your browser with arrow keys, a one-move step mode and a saved best score.

Ready โ€” press Start, or Step to move one square.

Score
0
Best score
0
Snake length
3
Food eaten
0
Moves
0
Head (col,row)
7,7
Food (col,row)
โ€”

Click or tab to the board first, then the arrow keys or W A S D steer the snake; the on-screen arrows do the same on a touchscreen. Step advances exactly one square, so you can play the whole game move by move without a timer.

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Snake is played on a grid: the snake moves one square every tick in whichever direction it is facing, and you steer it with the arrow keys, W/A/S/D or the on-screen pad. Eating a piece of food grows the snake by one segment and adds 10 points; the game ends when the head runs into a wall (in Solid mode) or into the snake's own body. You cannot turn 180ยฐ into your own neck, and โ€” as in the classic arcade rules โ€” the head may move into the square the tail is vacating on the same tick. Switch Walls to Wrap and the snake passes through the edges and reappears on the opposite side instead of dying.

Everything runs in your browser with plain JavaScript and a DOM grid โ€” no canvas plugin, no account, no ads, and nothing is uploaded. Your best score is kept in this browser's local storage only. Food is placed by picking a random free square; that randomness comes from a seeded generator, so adding ?seed=11 to the URL replays the exact same food sequence every time โ€” handy for practising a route or comparing runs. Use Step for a deliberate, timer-free game, or press Start to let the clock run at the speed you pick.

Frequently asked questions

How do you play the snake game?

Steer the snake with the arrow keys, the W/A/S/D keys or the on-screen arrow pad after clicking the board. The snake moves one square every tick; eating a piece of food grows it by one segment and adds 10 points. You cannot turn 180 degrees into your own neck. Press Start to let the clock run, or use Step to advance exactly one square at a time.

What happens when the snake hits the wall?

In the default Solid walls mode the game ends as soon as the head leaves the board, and your final score is shown in the status line. Switch Walls to Wrap and the snake passes through the edge and reappears on the opposite side instead, so only running into its own body ends the game.

Is this snake game free and does it work offline?

Yes. It is completely free, has no ads and needs no signup or download. The whole game is plain JavaScript running in your browser, so nothing is uploaded and it keeps working once the page has loaded. Your best score is stored in this browser's local storage only, and adding ?seed=11 to the URL replays the same food sequence every time.

Report a bug