FREE & OPEN SOURCE
HTML5 Games
Free Minesweeper Game — HTML5, Play Online or Embed
MineZip: classic minesweeper with three difficulties, guaranteed-safe first click, flag mode for touch and best times. One file.
What it is
MineZip is classic Minesweeper in one HTML file, with the details that make the classic feel right: the first click is always safe (mines are placed after it, excluding that cell and its neighbours), zero-cells flood open iteratively, numbers get the traditional per-count colors, and wrong flags are shown when you lose.
Three standard difficulties (Beginner 9×9/10, Intermediate 16×16/40, Expert 30×16/99), a mine counter that tracks your flags, a timer, and per-difficulty best times in localStorage. Desktop plays with left/right click; touch players get a dedicated flag-mode toggle. The board scales its cells to fit the screen, and Expert scrolls horizontally on phones instead of becoming unreadable.
No dependencies, no ads, no tracking — one file you can host, embed or run from disk.
Three standard difficulties (Beginner 9×9/10, Intermediate 16×16/40, Expert 30×16/99), a mine counter that tracks your flags, a timer, and per-difficulty best times in localStorage. Desktop plays with left/right click; touch players get a dedicated flag-mode toggle. The board scales its cells to fit the screen, and Expert scrolls horizontally on phones instead of becoming unreadable.
No dependencies, no ads, no tracking — one file you can host, embed or run from disk.
Server requirements & dependencies
- Any modern browser — that's the whole list
- Any static file host to publish it (or none: the file works from disk)
- To embed on a site: a plain <iframe> pointing at the file
- No server, no database, no build step, no dependencies, no network calls
How to install
1. Unzip. You get one file: index.html.
2. Put it anywhere — a folder on your website, GitHub Pages, Netlify, a USB stick — or just double-click it and play locally.
3. To embed it on an existing page: <iframe src="/minezip/index.html" style="width:100%;height:800px;border:0"></iframe>
Best scores save automatically in the browser's localStorage.
2. Put it anywhere — a folder on your website, GitHub Pages, Netlify, a USB stick — or just double-click it and play locally.
3. To embed it on an existing page: <iframe src="/minezip/index.html" style="width:100%;height:800px;border:0"></iframe>
Best scores save automatically in the browser's localStorage.
The prompt — build it yourself
Paste this into Claude and you'll get this product. This is the actual spec that produced the code above.
Paste this prompt into Claude to build this exact product:
What happened when we ran it: Claude produced the game in 223 lines. We verified the flood fill, safe-first-click placement, flag accounting and timer behavior by scripting real clicks against the page headlessly — the mid-game screenshot on this page is exactly that scripted session. Zero revisions.
Note: there is no demo restriction — the demo IS the full game, and the download is the same single file. The prompt is for reproducing (or remixing) the build yourself with your own Claude subscription.
Build classic Minesweeper as a SINGLE self-contained HTML file called MineZip (inline CSS/JS, no dependencies). Dark theme, red accent.
Rules done right: mines are placed only after the first reveal, never on that cell or any of its 8 neighbours (guaranteed useful first click). Zero-count cells flood-fill open with an ITERATIVE stack (no recursion depth limits on Expert). Numbers use the traditional color coding. Losing reveals all mines, marks the one you hit, and crosses out wrong flags. Winning = all safe cells open.
Features: three presets (9×9/10, 16×16/40, 30×16/99); flag with right-click AND a toggleable flag mode for touch devices; remaining-mine counter; timer starting on first reveal; per-difficulty best times in localStorage with a 'new best' callout. Cell size adapts to the viewport; the Expert board scrolls horizontally on small screens. Overlay for win/lose with the time.
Deliver the single HTML file, MIT header.
What happened when we ran it: Claude produced the game in 223 lines. We verified the flood fill, safe-first-click placement, flag accounting and timer behavior by scripting real clicks against the page headlessly — the mid-game screenshot on this page is exactly that scripted session. Zero revisions.
Note: there is no demo restriction — the demo IS the full game, and the download is the same single file. The prompt is for reproducing (or remixing) the build yourself with your own Claude subscription.
Reviews
Used Free Minesweeper Game — HTML5, Play Online or Embed? A star rating takes two seconds and helps others.
More builds
License: MIT — free for personal and commercial use, no warranty. Software is provided as is; review the code before running it in production (it's short enough to actually read).