Play Snake in Your Browser’s Address Bar — The Ultimate URL Hack

What Is “URL Snake”?

Imagine turning your browser’s address bar into a mini-game console.
That’s exactly what URL Snake does. It’s a creative web experiment that lets you play the classic Snake game directly inside your URL bar — no graphics, no canvas, just pure text and Unicode magic.

You can try it here:
https://demian.ferrei.ro/snake


Screenshots

ExampleDescription
The Snake rendered as Braille symbols inside the URL bar
Each game frame creates a new URL in your browser history
The URL stops updating when you crash

💡 How It Works

At first glance, this seems impossible — the URL bar is just text!
But here’s the genius part:

  1. Unicode Braille as Pixels
    Each Braille character represents an 8-dot grid (2×4). The game uses these dots as pixels to draw the snake and food.
  2. Rendering via the URL Hash
    Every frame of the game is encoded into the # part of the URL — for example: https://demian.ferrei.ro/snake#⠠⠤⠤⠤⠤⠤ As the snake moves, the page updates this section of the URL to redraw the game.
  3. Keyboard Controls
    You move with arrow keys (or WASD). The game listens for key presses and updates the snake’s position.
  4. Browser History Overflow
    Each change updates the URL → meaning every frame is a new entry in your browser history.
    Tip: Use Incognito mode to avoid clutter.

Step-by-Step Guide

Follow these simple steps to play:

StepWhat to DoWhat You’ll See
1Open Chrome, Firefox, or Edge (desktop preferred)A blank tab
2Visit https://demian.ferrei.ro/snakeMinimal web page loads
3Wait for the game to start or press any arrow keyURL changes to include Braille characters
4Use ← ↑ ↓ → or WASD to moveSnake moves as the URL updates
5Eat the dot “food” to growScore increases
6Avoid hitting walls or yourselfGame resets on collision

Known Quirks

  • Works best on desktop browsers with full URL bars visible
  • Mobile browsers often hide or shorten URLs, making the game unplayable
  • Some browsers may throttle frequent URL updates
  • Expect rapid history growth (hundreds of entries)

Why It’s Brilliant

  • Turns the address bar into a display
  • Uses Braille Unicode for efficient text-based graphics
  • Totally client-side, no data tracking or network calls
  • Open-source and hackable — the code is on GitHub
  • It’s a fun way to learn about URL hashes, Unicode, and browser behavior

Want to Explore the Code?

The project is open source — you can view it here:
https://github.com/epidemian/snake

Try forking it and rendering your own mini-games using the same URL-hash method.


URL Snake is a perfect example of how playful creativity meets web engineering.
It’s not just a game — it’s a lesson in what’s possible when you think outside the canvas.

“The web is full of hidden art — sometimes, it’s right in your address bar.”

You may also like...