Sudoku solver

Type in your sudoku and get the answer, or one hint at a time that names the technique, marks the cells and explains why in a sentence or two. Works for 9×9, 6×6 and 4×4 grids, plus diagonal, windoku and even/odd rules, in your browser with no sign-up.

Type digits, move with the arrow keys, Backspace clears. Shift plus a digit, or the pencil button, writes a small candidate mark. You can also paste a whole puzzle as text.

Solver

Paste or copy the puzzle as text

This sudoku solver works like a patient helper rather than an answer key. Enter the clues from your puzzle, then choose: Solve fills the whole grid and lists every step, Next hint shows only the next logical move and why it works, and Check my progress tells you whether the digits you have written so far are right. Everything runs in your browser; nothing you type is sent anywhere.

How to enter your puzzle

  1. Tap a cell and type a digit, or use the number pad under the grid. Arrow keys move around; Backspace clears.
  2. To paste a puzzle, copy it as 81 characters (digits for clues, dots or zeros for blanks) and paste it onto the grid, or use the text box under the solver buttons.
  3. Switch to Solve it yourself when the clues are in. Digits you type from then on are your own answers, shown in gray, so the solver can check them and give hints from where you are.

Repeated digits are marked in red as you type, with a line under the grid saying which row, column or box is the problem.

Scan a sudoku from a photo or screenshot

Press Scan a photo above the grid to read a puzzle from a picture instead of typing it. Take a photo of a newspaper or puzzle book with your phone camera, or choose a screenshot from a sudoku app. The reader finds the grid, straightens it, reads every cell and shows what it read on top of your picture. Tap any cell to fix it, then press Use this grid to load the clues and solve or ask for hints as usual.

All of this happens on your device: the picture is never uploaded, recorded or stored. Printed digits and app screenshots read best. Handwriting is not what the reader was trained on, so check handwritten digits carefully. Only the classic 9×9 grid is read (here and on the sudoku X page); killer cages and jigsaw regions cannot be read from a picture.

We tested the reader on 360 pictures we generated ourselves and never used in training: app screenshots, flat prints and photographed pages with tilt, blur, noise and shadows, a third of them in fonts it had never seen. It found the grid in 359, read 99.9% of the clue digits right and got every cell right in 354. Real photos vary more than generated ones, so always look over the grid before you use it; cells that were hard to read have a dashed ring.

How the hints work

The solver first proves that your puzzle has exactly one solution, using an exact search that tries every possibility. Then it solves the grid the way a person would, always using the easiest technique that makes progress. Each hint names the technique, highlights the cells and units involved, and explains it in one or two sentences. The techniques it knows, from easiest to hardest:

  • Singles: full house, hidden single, naked single.
  • Subsets and intersections: naked and hidden pairs, triples and quads, pointing pairs, box/line reduction.
  • Fish and wings: X-wing, swordfish, jellyfish, finned and sashimi X-wing and swordfish, XY-wing, XYZ-wing, W-wing.
  • One-digit patterns: skyscraper, two-string kite, empty rectangle, simple coloring.
  • Uniqueness: unique rectangle (types 1 to 4 and hidden), BUG+1.
  • Chains and sets: remote pair, X-chain and X-cycle, XY-chain, alternating inference chain (also grouped), ALS-XZ, ALS-XY-wing. The hint gives the chain in standard notation and draws it on the grid: solid lines for strong links, dashed lines for weak ones.
  • Forcing chains: cell and digit forcing chains and contradiction chains, the last logical resort, with every branch listed step by step.
  • Trial and error, only when none of the above applies (none of the 12,000 puzzles we generated needed it; a few famous puzzles built to be the hardest still do): the solver says which cell it tested and that every other digit there leads to a contradiction.

The difficulty rating (Easy, Medium, Hard, Expert, Master or Extreme) comes from the hardest technique the puzzle needs. Every step was checked in our tests against the true solution: thousands of steps on random and famously hard puzzles, with no wrong placement or wrong removal.

A worked example

Load the example puzzle and press Next hint. The first hint is a hidden single: in one of the boxes, a digit fits in only one cell because the other cells see that digit in their row or column. Press Place it and ask again. A few hints later you reach a box/line reduction: a digit's only places in a row are all inside one box, so it can be crossed out of the rest of that box. Later steps of this example need a W-wing and a unique rectangle, which is why it is rated Expert.

Tips

  • Turn on Show all candidates to see every possible digit in each empty cell, or keep it off and write your own pencil marks with Shift plus a digit (or the Pencil button).
  • If the solver says there is no solution, one clue is usually typed into the wrong cell. If it finds more than one solution, a clue is missing; it shows you two solutions and highlights where they differ.
  • Use Copy link to this puzzle to save or share the grid with your progress.

To learn the techniques the hints use, read how to solve sudoku and the full list of sudoku techniques. Bigger puzzles have their own solvers: samurai sudoku with five overlapping grids, and 16x16 sudoku.

Looking for a grid to play? Sudoku online has easy, medium and hard puzzles rated by this solver, with a daily puzzle.

Solver tested . Found a problem? Tell us.

Questions

Can a sudoku have more than one solution?

A proper sudoku has exactly one. If you enter a grid with too few or wrong clues there may be several; the solver then shows two of them and highlights the cells where they differ, so you can find the missing clue.

What is the minimum number of clues for a unique sudoku?

17. It was proved in 2012 by Gary McGuire and colleagues with an exhaustive computer search that no 9×9 sudoku with 16 clues has a unique solution. Many 17-clue puzzles exist.

Does the solver use guessing?

Only as a last resort, after every logical technique in its list, chains and forcing chains included. None of the 12,000 puzzles we generated needed it. If no technique applies, it says so and shows a trial step, naming the cell and the digits that lead to a contradiction.

Why does the hint say a digit can be removed instead of placed?

Many techniques do not place a digit directly; they rule out candidates. After the removal, a single usually appears. Turn on Show all candidates to follow along.

What do R3C5 and the colors mean?

R3C5 is the cell in row 3, column 5. In a hint, the lilac cells are the pattern, green cells are the second part of a pattern (such as the wings of an XY-wing), cream marks the rows, columns or boxes involved, and red strike-through candidates are the ones being removed.

Can I scan a sudoku from a photo or screenshot?

Yes. Press Scan a photo, then take a photo or choose a screenshot. The grid is read on your device and nothing is uploaded. You see every digit that was read and can fix any cell before it goes into the solver. Printed puzzles and app screenshots work best; handwritten digits are often misread.