Minesweeper Solver — Safe Cells & Mine Odds

Enter the board you're stuck on and the solver highlights every cell that's provably safe, every certain mine, and the exact mine odds for everything else. It all runs in your browser, nothing is uploaded.

How to Use the Solver

Choose your board size and set the total number of mines. Then recreate what you can see: type the number (0–8) shown in each revealed cell, type x in any cell you already know is a mine, and leave the still-covered cells blank. Press Solve. Provably safe cells turn green ✓, certain mines turn red ✕, and if nothing is certain, every hidden cell shows its mine probability so you can pick the safest guess. Tap Example to try one.

How the Solver Works

Each revealed number is really a constraint: "exactly this many of my hidden neighbours are mines." The solver reads every number into such a constraint, then reasons about them together — first the easy cases (a satisfied number means its neighbours are safe; a number that equals its hidden count means they're all mines), then the subset rule that compares overlapping numbers, and finally, where logic alone stalls, an exact enumeration of every valid mine arrangement to compute true per-cell probabilities. That's how it can prove safe cells and mines, and give exact odds when certainty isn't possible. Everything runs on your device — your board never leaves the browser.

Frequently Asked Questions

How do I enter my board?
Pick your board size, then type what you can see. Put the revealed number (0–8) in each numbered cell, type an x for a cell you already know is a mine, and leave the still-covered cells blank. The arrow keys move around the grid quickly. Then press Solve.
What do the colours mean?
Green with a check mark is a cell that is provably safe to open. Red with a cross is a cell that is certainly a mine. An amber percentage is the exact probability that a hidden cell is a mine, shown when no cell is 100% certain — the lowest percentage is the safest guess.
How does it find safe cells?
The solver finds safe cells by turning every revealed number into a constraint on its hidden neighbours. It then applies logic in layers: simple counting, the subset rule between two overlapping numbers, and, where those are not enough, an exact enumeration of every valid mine arrangement. A cell that is empty in all of those arrangements is proved safe, and one that holds a mine in all of them is proved to be a mine.
Why does it sometimes only show probabilities?
Probabilities appear because some Minesweeper positions genuinely cannot be resolved by logic alone. When no cell is provably safe and none is provably a mine, the solver enumerates the valid mine arrangements and counts how often each hidden cell holds a mine. That gives an exact percentage for every hidden cell, and the lowest one is the best guess available.
Is anything uploaded?
No — nothing you type is uploaded. The board and the whole analysis run in your browser, so no grid is sent to a server. Closing the tab clears everything.

Related Solvers & Games

Prefer to play? Try the AI Minesweeper game with its no-guess boards. Solving other games? Use the Sudoku Solver or the Connect 4 Solver, or browse all AI solvers & analyzers.

Add This Minesweeper Solver to Your Website

Put the Minesweeper Solver on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.

The credit line under the widget links back to LK Forge — please keep it so others can find it too.