Masyu Solver
Stuck on a Masyu from a book, newspaper or app? Recreate it in this free Masyu solver and it finds the loop — and tells you whether the puzzle has a unique solution.
How the Masyu puzzle solver works
The solver models every edge between neighbouring cells as line, no line or unknown. It repeatedly applies the Masyu rules — degree constraints (each cell has 0 or 2 lines), the black and white pearl rules, and the no-premature-loop rule — the same deductions described in our strategy guide. When logic alone stalls, it tries both options for an edge and backtracks on contradictions, stopping once it has found two different solutions (which proves the puzzle isn’t unique).
Solving Masyu in general is NP-complete, so extremely large or very sparse custom grids may take longer; puzzles from books and apps typically solve in well under a second.
Masyu solver questions
How do I use the Masyu solver online?
Pick the grid size, choose White or Black, click cells to place pearls, then press Solve. The free Masyu solver shows the loop in under a second for most book and app puzzles.
Can a Masyu puzzle have multiple solutions?
A properly made Masyu has a unique solution. Puzzles that are badly made or copied with a mistake can have none or several — the solver tells you which, so it doubles as a check for puzzle setters.
Can I use the solver as a Masyu editor?
Yes. Place pearls to design your own puzzle, check it has a unique solution, then press Play this puzzle to get a shareable link. Our guide on how to make a Masyu puzzle explains the craft.
Does this work as a loop puzzle solver for other puzzles?
It is built for Masyu’s pearl rules only. Other loop puzzles such as Slitherlink and Yajilin use different clues.