Free puzzle tool · Minesweeper, any board

Minesweeper Solver safe cells, mines and the best guess

This free Minesweeper solver finds the safe cells and mines that follow from your numbers on any board from 5x5 to 30x30, Expert 30x16 included, and gives the odds for every other hidden cell, in your browser with no download. Copy the numbers and flags from your board, then press Solve. Odds may be estimates or depend on an assumed mine density; the result tells you which.

Play the game

Updated

Enter your board

1Board size and mines

The mine count is optional and improves the odds; large boards may still need estimates. Custom boards take 5 to 30 rows and columns.

2Pick a brush, tap the cells

Keyboard: arrow keys move, 0 to 8 type a number, F places a flag, Backspace makes a cell hidden again. Tapping a cell that already shows the brush clears it.

Pick a brush, then tap the cells to copy your board. Hidden cells can stay as they are.

3Find the safe cells

Minesweeper solver facts at a glance

The Minesweeper solver reads any board from 5x5 to 30x30, including the classic Beginner, Intermediate and Expert sizes. It marks a cell safe or a mine when it follows from your numbers and flags, and shows odds for the other hidden cells. Large boards may need estimates; without a total mine count, the odds use an assumed density. It is free, needs no account and runs in your browser.

Source: the rules and limits in this solver’s code. Updated .
Board sizesBeginner 9x9 with 10 mines, Intermediate 16x16 with 40, Expert 30x16 with 99, or a custom board of 5 to 30 rows and columns
What you enterHidden cells, flags and the numbers 0 to 8; the total mine count is optional
Sure movesSafe cells and mines that follow from one number, from two overlapping numbers, or from counting every layout that fits
When you must guessThe chance of a mine on every hidden cell, and the lowest one marked as the best guess
Exact oddsWith a mine count and within the search limit, matching layouts are counted; past 60,000 partial layouts in one group or 2 seconds, the odds become estimates
Without a mine countCells away from the numbers are taken as a mine 1 time in 5
FlagsTrusted as mines; a wrong flag is reported if it breaks a number
Price and setupFree, no account, no download; runs in your browser, and a board link keeps the board in the link

How to use the Minesweeper solver

Pick your board size, paint the numbers you can see onto the grid, and press Solve: green cells are safe to open, red flags are mines, and when nothing is certain the cell with the lowest percentage is the best guess.

  1. Pick the board. Beginner, Intermediate and Expert fill in the size and the mine count. For any other board, choose Custom and type the rows, columns and total mines.
  2. Copy the open cells. Choose a brush (a number, 0 for a blank open cell, or a flag) and tap the cells. Cells you have not opened stay hidden, so you only paint what is open.
  3. Press Solve. The board shows sure safe cells with a check mark, sure mines with a red flag, and a percentage on every other hidden cell.
  4. Read the reasons. Under the board, each move comes with the numbers that prove it, such as which 1 already touches its mine.
  5. Keep going. Flag the sure mines adds the mines to your board. Open the safe cells in your game, paint the new numbers and press Solve again.

Minesweeper patterns: 1-2-1, 1-2-2-1 and 1-1

Most sure moves in Minesweeper come from a few patterns along a straight wall of numbers. The solver finds them with one rule: when two numbers share hidden cells, and one of them needs so many mines that the other number’s mines must all sit in the shared cells, the other number’s remaining cells are safe and the first number’s remaining cells are mines.

When Minesweeper needs a guess

Some Minesweeper boards have no safe move at all, and then the solver shows the odds instead. In the guess example, a Beginner board right after the first click, no hidden cell is sure. Two cells next to the ring of numbers, row 4 column 3 and row 4 column 8, have only a 2.9% chance of a mine, while a cell far from the numbers has 9.4% and the worst cells next to the ring have 56.5%. The solver marks the lowest chance as the best guess; when several cells tie, it picks the one with the fewest hidden neighbors, such as a corner, because it is the most likely to open up.

Beginner, Intermediate and Expert boards

The three classic boards differ in how crowded they are: Beginner has 10 mines on 81 cells (12.3%), Intermediate has 40 on 256 (15.6%) and Expert has 99 on 480 (20.6%). The more crowded the board, the more often you reach a position with no safe move, which is why Expert games so often end on a guess. The stuck Expert example above has 63 hidden cells next to numbers; the best guess there, row 6 column 23, has a 5.8% chance of a mine against 19.8% for a cell far from the numbers.

For a board from another version of the game, choose Custom and enter its rows, columns and mine count. Google’s Minesweeper, for example, has Easy at 8 rows by 10 columns with 10 mines, Medium at 14 by 18 with 40, and Hard at 20 by 24 with 99. If you do not know the mine count, clear the field: the sure moves stay the same, and only the percentages change.

A board with a mistake

If a number or a flag was copied wrong, the board may have no possible layout of mines. The solver then names the number that cannot be satisfied, and outlines it in red on the board, instead of giving an answer. Flags count as mines, so a wrong flag shows up here as well.

How the solver works

The solver first checks every number against its neighbors. Then it applies two kinds of rules until they find nothing new: a number that already touches all its mines makes its other hidden neighbors safe, a number with exactly as many hidden neighbors as missing mines makes them all mines, and two overlapping numbers give the patterns above. Next it counts every layout of mines that fits the remaining numbers. Hidden cells next to numbers are split into groups that share no number, and each group is counted with a table of how many mines each half-filled number still needs, so even long walls on an Expert board are counted exactly rather than one layout at a time. When a mine count is supplied and the search finishes within its limit, each layout is weighted by the number of ways to place the remaining mines away from the numbers. Without a mine count the odds use an assumed density; past the search limit the percentages are estimates. A cell proved to contain a mine is marked as a sure mine, and one proved empty is marked as a sure safe cell. Other cells receive odds based on the completed count or an estimate. Everything runs in your browser.

Frequently asked questions

Does the Minesweeper solver ever guess for me?

No. It marks a cell safe or a mine only when every layout of mines that fits your board agrees. When no cell is sure, it shows the chance of a mine on each hidden cell and marks the lowest as the best guess, and the choice stays yours.

Why does the solver ask for the total number of mines?

The total changes the odds for cells far from the numbers, and near the end of a game it can decide cells that the numbers alone cannot. Beginner, Intermediate and Expert fill it in for you. If you leave it empty, cells away from the numbers are taken as a mine 1 time in 5.

What does the percentage on a hidden cell mean?

With a mine count and a completed exact search, it is the share of matching layouts that put a mine on that cell. Without a mine count the odds use an assumed density; if the search limit is reached, they are estimates. Check the result note for which applies.

Are my flags treated as mines?

Yes. Every flag you paint counts as a mine. A wrong flag can make the board impossible, and the solver then names the number it breaks; if you are not sure about a flag, leave that cell hidden instead.

Why does the solver say no layout of mines fits my board?

At least one number or flag does not match the real board, usually a number copied into the wrong cell. The solver names the number it cannot satisfy and outlines it in red, so check that cell and its neighbors against your game.

Does it work with Google Minesweeper?

Yes. Choose Custom and enter the size of your Google board: Easy is 8 rows by 10 columns with 10 mines, Medium is 14 by 18 with 40, and Hard is 20 by 24 with 99. Then copy the numbers you can see and press Solve.

Can I upload a screenshot of my board?

No. You copy the board by tapping: pick a number or a flag as the brush and tap the cells. Hidden cells can stay as they are, so you only paint the cells that are open, and Copy board link keeps the board.

Is the Minesweeper solver free?

Yes. It is free, with no account and no download, and it runs in your browser. Copy board link saves the board in the link itself, so you can reopen it or send it to someone.

More puzzle solvers

Sorting puzzles

Grid and logic puzzles

Cards, words and colors

All tools