Puzzle solver tool

Minesweeper Solver

This Minesweeper solver helps you map your board, identify safe clicks, and flag forced mines without leaving the browser. Enter your current puzzle, run the analysis, and use the highlighted next moves to solve faster.

💣

Minesweeper Solver

Advanced constraint-based solver

Fill the board with numbers and flags, then click Solve to find safe moves!

🚩 40
Tools (or use keys 0-8, F, G, C):

📖 How to use the Minesweeper Solver

1. Set the board size and number of mines to match your game.

2. Click a tool, then click board cells to enter numbers or mark flags.

3. Right-click any cell to quickly toggle a mine flag.

4. Use Find Next Move to reveal definite safe squares and mines.

5. Green markers are safe squares. Red markers are mines.

6. A ? marks the cells with the highest safety probability when no forced move exists.

Keyboard Shortcuts

0-8 Select number F Flag tool G Safe tool C Clear tool R Reset board
Minesweeper Solver | Advanced Constraint Satisfaction Algorithm

What is Minesweeper?

Minesweeper is a logic puzzle game that Microsoft bundled with Windows starting in 1990. Robert Donner created the original version in 1989. The concept: a grid of cells, some hiding mines. Click a cell and it reveals a number — that number tells you how many of its 8 neighbors contain mines. Click a mine and you lose. Flag all mines and reveal all safe cells to win.

The game seems simple at first. A "1" with one unrevealed neighbor? That neighbor is a mine. A "3" with three flags around it? The remaining neighbors are safe. But as boards get larger and mine density increases, the logic chains get longer and harder to follow. Expert mode (30x16, 99 mines) is genuinely difficult even for experienced players.

The game shipped on every Windows PC for over a decade. An entire generation learned to play it during computer class. It's one of the most-played video games in history by total hours.

Why You Keep Clicking Mines (It's Not Always Bad Luck)

About 30% of Expert-level Minesweeper boards require at least one guess. That's not a skill issue — it's a mathematical fact. When two unrevealed cells share the same constraints and neither can be logically eliminated, you have to pick one and hope.

But most mine clicks aren't forced guesses. They're missed deductions. A "2" next to a "1" might look ambiguous, but if you account for the shared neighbor, one of those cells is forced. These patterns — 1-2, 1-1, and their variants — are the building blocks of Minesweeper logic.

The solver catches every forced deduction. It doesn't miss the 1-2 pattern or the subset relationship. When it says there are no safe moves, you're genuinely in a guessing situation — and it highlights the cell with the lowest mine probability so your guess has the best odds.

How Our Minesweeper Solver Works

You enter your board state: the revealed numbers, any flagged mines, and the total mine count. The solver applies constraint-based logic to each number on the board. If a number's remaining mine count equals its remaining unrevealed neighbors, all those neighbors are mines. If a number already has enough flags, all other neighbors are safe.

When simple constraints aren't enough, the solver checks subset relationships. If the unknowns around a "2" are a subset of the unknowns around a "3," the difference set contains exactly one mine. This eliminates candidates that neither number could reach alone.

When no forced move exists, the solver calculates mine probabilities for each unrevealed cell and marks the safest option with a question mark. It's not guaranteed safe — but it's the best probability you'll get.

When You Have to Guess in Minesweeper

Forced guesses happen most often in two situations: the opening move (every cell is unknown, so the first click is always a gamble), and endgame patterns where two cells share identical constraints.

The opening move gamble is unavoidable. Windows Minesweeper actually guaranteed your first click was never a mine — most modern versions do the same. After that, logic takes over for most of the board.

Endgame guesses are where probability matters. If you have to choose between a cell with a 30% mine chance and one with 70%, pick the 30% one. The solver calculates these exact probabilities using constraint propagation across the entire board, not just local neighbors.

Tips for Reading the Board Faster

1

Start from the edges of revealed areas

The boundary between revealed and unrevealed cells is where all the information lives. Scan the boundary systematically — top to bottom, left to right — instead of jumping around randomly.

2

Learn the 1-1 and 1-2 patterns

Two of the most common patterns. A 1-1 along an edge means the cell beyond the second 1 is safe. A 1-2 means the cell beyond the 2 is a mine. These two patterns solve about 40% of Expert boards on their own.

3

Count the remaining mines

If there are 5 mines left and 5 unrevealed cells, every unrevealed cell is a mine. If there are 2 mines left and 10 unrevealed cells, each cell has a 20% mine chance. The total mine count is a constraint the solver uses — and you should too.

Minesweeper Difficulty Levels Explained

Beginner

9x9 grid, 10 mines. About 12% mine density. Almost every cell can be deduced logically. Good for learning the number patterns.

Intermediate

16x16 grid, 40 mines. About 16% density. Requires longer logic chains. The 1-2 and 1-1 patterns appear constantly. Occasional guesses needed.

Expert

30x16 grid, 99 mines. About 21% density. Long constraint chains, subset relationships, and frequent forced guesses. The solver earns its keep here.

Minesweeper Solver FAQs

How do I use this Minesweeper solver?

Match the board size and mine count to your game, enter the revealed numbers and flagged mines, then click Find Next Move. The Minesweeper solver marks forced safe cells and forced mine cells directly on the board.

What do the green and red markers mean?

Green markers are safe squares the solver says can be clicked safely. Red markers are mine locations the solver can prove. If there is no forced move, the solver marks the safest candidates with a question mark.

Can this Minesweeper solver handle custom board sizes?

Yes. You can change the width, height, and total mine count before resetting the board. That makes the tool useful for beginner, intermediate, expert, and custom Minesweeper layouts.

Does this Minesweeper solver work on mobile?

Yes. The board editor and solver controls are responsive, so you can use the Minesweeper solver on desktop and mobile browsers without installing anything.

More Solvers