Games

Minesweeper

Classic minesweeper — clear cells using number hints.

40
0:00

Best –

Recent (up to 5)

    No records yet — clear a board!

    What is this?

    Minesweeper is a puzzle where you open every safe cell on a grid while avoiding hidden mines. Numbers on opened cells tell you how many mines are among the 8 surrounding cells — use them to deduce mine locations.

    How to play

    Pick a difficulty (beginner, intermediate, expert), then click cells to open them. Your first click is always safe — mines are placed only after it. Opening a blank cell with no adjacent mines automatically cascades open its neighboring blank cells. Right-click (or long-press on mobile) to toggle a flag on a suspected mine so it can't be opened by accident. Clicking a mine ends the game immediately and reveals all mines; opening every non-mine cell wins.

    Privacy

    Your best record (fastest clear time) per difficulty is stored only in your browser (localStorage) and is never sent to a server or shared across devices.

    The first-click-safe rule — how this implementation actually works

    This tool places mines only after your first click lands. In the code, mine positions are drawn at random from every cell except the one you just clicked, so the cell you open first can never be a mine. What it does not do is the more generous variant that also guarantees the 8 neighboring cells are mine-free, which forces a large open area on the very first move. So it's entirely possible for a mine to sit right next to your first opened cell, leaving you with just a number to work from. That's barely noticeable on low-density Beginner (9×9, 10 mines), but on high-density Expert (16×30, 99 mines) it's common to start with nothing but a numeric hint.

    Basic number-deduction patterns — a worked "1-2-1" example

    Each number tells you how many mines sit among its 8 neighboring cells, and combining several numbers lets you deduce definitely-safe or definitely-mined cells through a handful of recurring patterns. The best-known is the "1-2-1" pattern: when three cells in a row read 1, 2, 1, and four unopened cells run alongside them, the two outer cells are guaranteed mines and the two middle cells are guaranteed safe. This works because each number's constraint — exactly that many mines among its unopened neighbors — has to hold simultaneously across all three numbers. Two simpler rules go a long way too: if a "1" has only one unopened neighbor, that neighbor is a certain mine; and if a number's count already matches its adjacent flags, every other unopened neighbor is certainly safe. Applying both consistently extends how far you can progress without guessing.

    Is the first click always safe?
    Yes. The very first cell you open can never be a mine — mines are placed right after your first click, excluding that cell.
    How do I place a flag?
    Right-click on desktop, or long-press on mobile, to toggle a flag on a cell. Flagged cells can't be opened by a normal left-click.
    What do the numbers mean?
    Each number shows how many mines are among the 8 cells surrounding it. A blank cell has zero adjacent mines, and opening one automatically cascades open its neighboring blank cells.
    Where is my record stored?
    Your best record (fastest clear time) per difficulty is stored only in your browser's local storage — never sent to a server or shared across devices.
    Is the first click truly 100% safe?
    Yes, the clicked cell itself is never a mine. But this implementation doesn't extend safety to its neighbors, so a mine can sit right next door and leave you with just a number to start.
    What's the "1-2-1" pattern?
    When cells reading 1, 2, 1 sit next to four unopened cells, the two outer cells are always mines and the two middle cells are always safe — one of the most useful deduction patterns.
    Can I solve without guessing?
    Two rules cover a lot of ground: a "1" with only one unopened neighbor makes that neighbor a certain mine, and a number whose flag count already matches it means every other unopened neighbor is safe.