How to play Minesweeper
Somewhere under the grid are mines. Open squares until every square that is not a mine is open, and you have won. Open a mine and the game is over.
A number on an opened square tells you exactly how many of the eight squares touching it — including diagonals — hold mines. A square with no number touches none, so opening one opens its entire blank region and the ring of numbers around it in a single click. That cascade is where nearly all your information comes from, which is why the first click matters so much.
Right-click a square to flag it as a mine (long-press on a phone, or turn on Flag mode). A flag does nothing to the board except stop you clicking that square by accident and let you chord — it is bookkeeping, not progress.
The four things almost everyone gets wrong
1. "The first click is safe" and "the first click opens a region" are different promises
Windows Minesweeper before Vista only guaranteed the first — and it did it by moving the mine to the first empty square on the top row after you had clicked. That is safe, and it can still drop you on a bare number with nothing to deduce and nothing to do but click again and hope. Windows Vista introduced the stronger guarantee: the first click always opens up.
We do the stronger one, and we do it by construction rather than by repair. Nothing is placed until you click; then the mines are dealt into the board with your square and all eight of its neighbours excluded. So your square is a zero, and a zero always unfolds. The test suite asserts this at all three sizes and in all four corners, because a corner click has only three neighbours to clear and that is where an off-by-one hides.
2. The flood fill that reveals the border twice
Opening a blank region is a flood fill, and it has to reveal the ring of numbers around the region exactly once. The classic bug is a queue that pushes neighbours before marking them opened, so a number reachable from two different blank squares enters the queue twice and gets counted twice. Nothing on screen looks wrong. What breaks is the count of squares opened — and therefore the win condition, silently, only on boards where two regions touch.
Our test suite builds exactly such a board, runs the correct flood and a deliberately broken one written beside it, and asserts that the broken one over-counts. A regression test that has never been shown to fail is not a test.
3. Chording checks how many flags you placed, not whether they are right
Clicking a number that already has the matching number of flags around it opens all its other neighbours at once. It is the single biggest speed-up in the game. It is also the only move that can kill you while you think you are being careful: put two flags in the wrong places beside a 2 and chord it, and you will open a mine. The rule tests the count.
An implementation that checks your flags against the real mines before chording has removed the risk and turned a decision into a formality. Ours does not, and the suite asserts both directions — a chord with the right flags opens, a chord with the right count in the wrong places detonates and marks which flags were wrong.
4. You win by opening squares, not by flagging mines
The win condition is every non-mine square opened. Flags are irrelevant to it. You can win a board having placed zero flags — our suite does exactly that, every run — and you can flag every single mine correctly, watch the counter hit zero, and still not have won, because a safe square is still covered. Plenty of implementations end the game on the last flag, which is a different game from the one they are advertising.
No guessing. This is the part worth the page.
A Minesweeper board that forces a guess is not a hard board, it is a broken one. You do everything right for four minutes and then a coin decides. And it is not rare — it is the normal case at the top level.
We measured it rather than asserting it. Two hundred randomly generated boards per level, each one given the guaranteed opening and then handed to a complete constraint solver — counting rules first, then exhaustive enumeration of every arrangement consistent with the whole visible frontier, plus the mine counter:
Beginner 90.5% clearable by logic alone. Intermediate 73.0%. Expert 16.5%. More than four out of five random Expert boards force at least one guess, and that is with a perfect logician playing. That is the product almost every Minesweeper site ships.
Ours cannot produce one. After your first click the generator deals a random layout and then plays the whole board with that solver, opening only squares it has proved safe. If the solve ever stalls, the layout is thrown away and another is dealt. You never see a board that did not clear. On Expert this takes about seven attempts and a few dozen milliseconds; the number of layouts tried and the time it took are printed beside the board, so the claim is inspectable rather than decorative.
The test suite proves it a second time, independently: it regenerates the board, replays the entire solve from the first click, and asserts every single square was forced. And the solver asserts its own soundness on every move — if a square it called safe turns out to hold a mine, it throws, in the generator, long before a board like that could reach you.
Exact odds, counted rather than estimated
Press Odds and every covered square shows the exact probability that it holds a mine. Not a heuristic, not a sample: the solver enumerates every arrangement of mines consistent with every number on the board, and the probability is the fraction of those arrangements that put a mine there.
It works by splitting the frontier into independent groups, enumerating each group's arrangements tallied by how many mines each uses, then recombining the groups against the total mine count and folding in the squares nobody is looking at with binomial coefficients. The forced-safe and forced-mine verdicts are decided by exact integer reachability rather than by thresholding a floating-point number, because "probability 0.0000000001" rounded to "safe" is a game that kills you.
On a board this page dealt, at least one square always reads 0%. That is the guarantee made visible instead of merely claimed in the copy.
Is Minesweeper NP-complete? Nearly, and the precise version matters
Richard Kaye proved in 2000 that the Minesweeper consistency problem is NP-complete — given a grid of opened, flagged and unknown squares, deciding whether any arrangement of mines fits it at all is as hard as any problem in NP. He proved it by building Boolean circuits out of Minesweeper positions: wires that carry a signal, AND and NOT gates, splitters. The reference is "Minesweeper is NP-complete", The Mathematical Intelligencer 22 (2000), no. 2, 9–15.
The popular version of this — "Minesweeper is NP-complete" full stop — is not quite what was settled, and that was argued in print: Allan Scott, Ulrike Stege and Iris van Rooij, "Minesweeper May Not Be NP-Complete but Is Hard Nonetheless" (Mathematical Intelligencer, 2011). Consistency is a question about a static grid; playing is a question about a sequence of decisions under uncertainty. We cite both papers and re-prove neither, because neither is reproducible in a browser.
What the theorem actually costs us is concrete, and it is the honest limitation of this page. Our exact solver is exponential in the worst case by a theorem rather than by a bug, so it carries a search budget. If a position ever exceeds it, the solver reports that it did not finish — it does not guess, and nothing downstream treats "unknown" as "safe". Our test suite squeezes the budget until it fires and asserts that it says so. In practice the boards this page deals never come close: the largest frontier group we have measured resolves in a few thousand search nodes.
Two more honest limitations
The no-guess guarantee assumes you use the mine counter. The number of mines left is a real constraint and it is the deduction most casual players never make. Some boards need it: of sixty guess-free Beginner boards we tested, fifty-two are also clearable without ever looking at the counter, so eight of them require it at least once. The counter is on screen the whole game.
The probabilities are exact under uniform placement. That is the right model for Classic mode, where the board really is a uniformly random layout. On a no-guess board it is not quite: our generator rejects layouts, so its boards are not uniformly distributed, and a displayed 33% is the uniform-model figure rather than the true posterior given that the board passed our filter. It never matters for a decision, because on our boards a 0% square always exists — but it is true, and saying nothing about it would be the small lie.
Strategy that actually helps
Learn 1-2-1 and 1-2-2-1 and you have learned most of the game. Where three opened squares read 1-2-1 along a row with covered squares beneath them, the two outer covered squares are mines and the middle one is safe. Where four read 1-2-2-1, the two middle ones are mines and the outer two are safe. Both are three lines of arithmetic: for 1-2-1, the 1 says a+b=1, the 2 says a+b+c=2, so c=1; the far 1 says b+c=1, so b=0 and a=1.
The rule underneath both is 1-2-X. Wherever a 1 and a 2 sit side by side over the same run of covered squares, the square past the 2 is a mine — and you do not need to know what the third number is. Our suite checks that by enumerating every third number that is consistent at all (there are exactly two) and confirming the conclusion holds for both.
Count the mine counter, especially at the end. When the counter says 3 and you have four covered squares in a corner and a wide open field elsewhere, the field is not empty — it is constrained. Most endgame "50/50s" are not 50/50 once the global count is applied, and the Odds panel will show you the difference.
Chord everything you can. Flagging then chording is far faster than opening squares one at a time, and 3BV/s — board value divided by time — is the metric the competitive scene uses precisely because it measures this. Both numbers are on your end screen.
Start in the middle. Because the first click here always opens a region, a central click opens a larger one on average than a corner click, which gives you more to work with. On sites without the opening guarantee this advice is a trade-off; here it is free.
Questions people ask
What are the standard Minesweeper difficulty levels?
Beginner is 9×9 with 10 mines, Intermediate is 16×16 with 40 mines, Expert is 30 wide by 16 tall with 99 mines. The densities are 12.3%, 15.6% and 20.6%. Some Windows builds shipped an 8×8 Beginner with 10 mines instead — which works out at exactly 15.625%, identical to Intermediate, so that Beginner is only easier because it is smaller. The 9×9 one we ship is genuinely 21% sparser.
Is the first click always safe?
Here, yes, and it always opens a region as well. See the section above for why those are two different guarantees and which one older Windows actually gave you.
Do you ever have to guess?
Not on a board this page dealt. In ordinary Minesweeper, constantly — we measured 16.5% of random Expert boards as clearable by logic alone. Classic mode is there if you want those.
How does chording work?
Click a number with the matching count of flags around it and it opens the rest of its neighbours. It tests the count, not the correctness, so a chord on wrong flags will kill you.
What is 3BV?
Bechtel's Board Benchmark Value: the fewest left-clicks that can clear the board — one per opening, plus one for every numbered square that touches no opening. It is the honest measure of how much board there is, and 3BV divided by your time (3BV/s) is how the competitive scene compares runs. Shown for every board here.
Is Minesweeper NP-complete?
The consistency problem is (Kaye, 2000). Whether that settles the question about playing the game was disputed in print by Scott, Stege and van Rooij in 2011. Both are cited above; we re-prove neither.
Is this Minesweeper free?
Yes. No signup, no account, no daily limit, no ads between you and the board, no paid hints, no premium tier. Hints and the exact-odds solver are unlimited.
Where Minesweeper comes from
The game is much older than the version most people picture. Mined-Out, written by Ian Andrew and published by Quicksilva for the ZX Spectrum in 1983, is generally credited as the first game of this shape, and Eurogamer has named it as such. Grid-and-hidden-mines games circulated on mainframes and early home computers through the seventies and eighties.
Microsoft Minesweeper — written by Robert Donner and Curt Johnson — shipped in the Microsoft Entertainment Pack in 1990 and then with Windows 3.1, which is how it reached hundreds of millions of people. Johnson has said the design was borrowed from another game, while denying it was Mined-Out.
On the intellectual property, plainly: game mechanics and rules are not
copyrightable, and the rules of Minesweeper have been implemented independently hundreds
of times. What is protected is a specific implementation — Microsoft's artwork, its
smiley-face button, its exact interface, its code. None of that is here. This is not Microsoft
Minesweeper, is not affiliated with or endorsed by Microsoft, and contains no assets from it.
Every pixel on the board is drawn procedurally by play/minesweeper.js — the caps, the
flags, the mines, the number colours are our own, and the board deliberately does not use
the classic grey-on-grey scheme, because a covered square and an opened square being the same
colour is that interface's worst legibility flaw rather than something to copy. Every board is
generated by play/minesweeper-engine.js.
The honest small print
Your times and results are stored as unverified, because a browser can lie about its own score and we would rather label it than pretend otherwise. Boards are seeded, so the same seed and the same first click always give the same board — the seed is shown beside the board and "Replay board" gives you it again. "Give up" reveals the mines and is deliberately a separate button that says what it does; nothing on this page ever opens a square for you. The 3BV figure is implemented from the standard community definition; we could not retrieve a verbatim primary source for it, so it is checked against boards small enough to count by hand rather than against a published table, and that is stated here rather than left to be discovered. Expert on a narrow phone puts a 30-column board into 390 pixels, which makes the squares small — that is inherent to the size and not something we can style away, so Beginner and Intermediate are the honest recommendations on a phone.