Collection of free JavaScript Snake game code examples from codepen and other resources. Update of February 2020 collection. 6 new items.

Links
Made with
- HTML / CSS / JS
About a code
Vanilla JS Snake
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: yes
Dependencies: font-awesome.css

Links
Made with
- HTML / CSS / JS
About a code
Fading Snake
No libraries, no preprocessors, no imports not even SVG or canvas. Just plain HTML, CSS, and JavaScript.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: -

Links
Made with
- HTML / CSS / JS
About a code
Snake Game
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: -

Links
Made with
- HTML / CSS / JS
About a code
Pixelated Snake Game
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: yes
Dependencies: jquery.js

Links
Made with
- HTML / CSS / JS
About a code
AI Snake
Can you win that AI snake? I don't think so.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: yes
Dependencies: nes.css

Links
Made with
- HTML / CSS (SCSS) / JS
About a code
Neon Snake
Neon snake game built on HTML5 Canvas.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: -

Links
Made with
- HTML / CSS / JS
About a code
16bit Snake Game
Use keyboard arrows or buttons. 1. Hitting walls is a no-no. 2. Don't eat yourself. 3. Traveling backwards is a no-no too. 4. Everytime you fail it's faster.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: font-awesome.css, jquery.js

Links
Made with
- HTML / CSS (SCSS) / JS (Babel)
About a code
SN4KE
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: yes
Dependencies: -

Links
Made with
- HTML / CSS (SCSS) / JS (Babel)
About a code
React Game: Snake
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: react.js, react-dom.js

Links
Made with
- HTML / CSS (SCSS) / JS (TypeScript)
About a code
Snake
A retro game of Snake with keyboard and touch controls.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: jsfx.js, rx.js

Links
Made with
- HTML / CSS / JS
About a code
Snake Game - p5js
Eat the grey square. Don't hit the red borders or the snake body.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: p5.js, p5.dom.js

Links
Made with
- HTML / CSS / JS
About a code
Snake
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: -

Links
Made with
- HTML / CSS / JS
About a code
Snake Game
This is a basic snake game made with JavaScript for logic and CSS for rendering. Use the arrow keys or WASD
to control the snake. You can loop through walls.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: yes
Dependencies: -

Links
Made with
- HTML / CSS / JS
About a code
Snake Game With Obelisk.js
The movement is relative to the snake, so you use only left and right keys.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: obelisk.js

Links
Made with
- HTML / CSS / JS
About a code
Canvas Snake Game
Found a nice script around the net. Pimped it a bit and got this result :) Hope you like it!
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: jquery.js

Links
Made with
- HTML / CSS / JS
About a code
Simple Snake Game
HTML5 game.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Responsive: no
Dependencies: -