Sudoku Solver & Generator
Solve any Sudoku instantly or step by step, check it, and print new puzzles with answers.
Your puzzle
Click or tap a cell, then type a number or use the buttons. Arrow keys move; Backspace or Delete clears; typing moves on to the next cell. Rows are R1, R2 … from the top and columns C1, C2 … from the left; boxes are numbered left to right, top to bottom.
Paste a puzzle as text
81 characters for a 9×9 puzzle, row by row, with 0 or . for each empty cell. Line breaks, spaces and borders drawn with | - + * are ignored; 4×4, 6×6 and 16×16 puzzles are recognised by their length.
Step by step
Ready
Press Next step to see the first move and why it works. The small numbers in each empty cell are its candidates: the values its row, column and box still allow.
Result
Your puzzles
About the Sudoku Solver & Generator
Type or paste a Sudoku and press Solve for the answer at once — or press Step by step to be walked through it the way a person solves it, one named technique at a time: full house, naked and hidden singles, pointing and claiming, naked and hidden pairs, triples and quads, X-Wing, Swordfish, Jellyfish, XY-Wing and XYZ-Wing. Every step names the cells and houses it uses and explains why the candidates it removes cannot be right.
It handles 4×4, 6×6, 9×9 and 16×16 grids. Check tells you whether the clues are valid and whether the puzzle has exactly one solution — if it has more, the cells where two solutions differ are outlined — and grades it Easy, Medium, Hard or Expert by the hardest technique it needs.
Make & print puzzles creates new puzzles of the size and difficulty you choose, each with exactly one solution, and saves them as a print-ready PDF with an answer key. Everything runs in your browser.
How to use it
- Choose the grid size, then type the clues into the grid — click or tap a cell and type, or use the number buttons under it — or paste the puzzle as text, for example 81 characters with
.or0for each empty cell. - Press Solve to fill in the answer: the cells you entered stay in bold and the solved ones appear in colour. The result also says how many clues there are and how hard the puzzle is.
- For help instead of the answer, press Step by step, then Next step — or Hint to see only which technique comes next and where. Solve with logic runs every step, Undo goes back one, and Copy steps copies the whole explanation.
- Press Check to find out whether the puzzle is valid, has exactly one solution and how hard it is, without filling it in.
- To make puzzles, open Make & print puzzles, choose the size, the difficulty and how many, press Make puzzles, then Download PDF (with the answers at the end) or Print.
Examples
9..86....168.25..7..4..95...4.....32.9348267.81.....4...19..3..3..24.718....53..9
Solved · 37 clues · one solution · Easy (hidden singles are the hardest step)
Step by step → Next step
Naked single: R1C8 can only be 2 — every other digit is already in its row, column or box.
The “9×9 Hard” example, Step by step
X-Wing on 1: in columns 3 and 9, 1 can only go in rows 3 and 9 … so no other cell of rows 3 and 9 can be 1: remove it from R3C6 and R9C8.
The whole solution takes 55 steps: 53 singles, one X-Wing and one XY-Wing, so it is graded Hard.
6 puzzles · 9×9 · Medium · 2 per page · answer key
A 4-page PDF: 3 pages of puzzles, then all six answers on one page
256 characters using 1–9 and A–G (or 0–9 and A–F), with . for each empty cell
Recognised as 16×16 from its length, and solved in the background
Common uses
- Checking your answer — or finding the one cell you got wrong — in a newspaper or app puzzle.
- Getting unstuck without spoiling the whole puzzle: one hint or one step at a time.
- Learning techniques such as pointing pairs, X-Wings and XY-Wings on puzzles you are actually solving.
- Testing whether a puzzle you made has exactly one solution before you share it.
- Printing puzzles with answer keys for a classroom, a club, a newsletter or a long journey — 4×4 for young children up to 16×16 for experts.
How the difficulty is graded
The solver always takes the easiest step available, and a puzzle’s grade is the hardest technique that path needs:
- Easy: full houses, naked singles and hidden singles only.
- Medium: also pointing, claiming, and naked or hidden pairs.
- Hard: also naked or hidden triples, X-Wings and XY-Wings.
- Expert: also naked or hidden quads, Swordfish, Jellyfish and XYZ-Wings.
- Beyond these techniques: the puzzle needs something the tool does not teach — chains, forcing arguments or trial and error. Solve still finds its answer.
There is no universal difficulty scale: books, newspapers and apps each grade in their own way, so a puzzle called “hard” elsewhere may be Medium here, or the other way round.
The techniques in brief
- Full house: the last empty cell of a row, column or box.
- Naked single: a cell that only one value fits.
- Hidden single: a value that fits only one cell of a row, column or box.
- Pointing: inside a box, a value fits only in one row (or column), so it can be removed from the rest of that row.
- Claiming: inside a row (or column), a value fits only in one box, so it can be removed from the rest of that box.
- Naked pair, triple, quad: two, three or four cells of a house that between them can only hold the same two, three or four values; those values go nowhere else in the house.
- Hidden pair, triple, quad: two, three or four values that fit only the same two, three or four cells of a house; those cells hold nothing else.
- X-Wing, Swordfish, Jellyfish: a value that fits only in the same two, three or four columns of two, three or four rows (or the other way round); it can be removed from the rest of those columns.
- XY-Wing: a two-candidate cell XY that sees cells XZ and YZ; whichever value it takes, one of them is Z, so any cell that sees both cannot be Z.
- XYZ-Wing: like an XY-Wing with a three-candidate pivot XYZ; cells that see all three cannot be Z.
None of these techniques assumes the puzzle has only one solution, so every step is a safe deduction.
How the puzzles are made
Each puzzle starts from a random, completely filled grid. Clues are then taken away one at a time — in matching pairs on opposite sides of the centre when Symmetric clue pattern is ticked — for as long as the puzzle can still be solved with the techniques of the chosen difficulty. A puzzle that logic alone solves has exactly one solution, so every puzzle printed has one. It is kept only if it really needs a technique of its level; otherwise the generator starts again with a new grid.
Easy puzzles keep more clues (at least 37 in a 9×9 grid); Medium puzzles stop at about 29 once they need a Medium technique; Hard and Expert puzzles keep as few clues as the method allows. Puzzles are made fresh each time — press Make puzzles again for a new set.
Typing and pasting puzzles
Rows run from the top and columns from the left, so R4C7 is the cell in row 4, column 7. Boxes are numbered left to right and top to bottom; in a 9×9 grid box 5 is the centre one. 6×6 grids have boxes of 2 rows × 3 columns.
A pasted puzzle can be one line of 81 characters, a grid drawn with |, -, +, * or box-drawing lines (such as *-----------* borders and ---+---+--- rules), or numbers separated by commas or spaces (16×16 puzzles may use 1–16). Empty cells can be written as 0, ., -, _, *, ? or x. 16×16 puzzles use 1–9 then A–G, or 0–9 then A–F; the tool recognises a G or a mix of 0s and dots and switches for you. Copy solution and Copy as grid give the answer back in the same styles.
Limitations
- The step-by-step solver knows the techniques listed above. Some very hard puzzles need more advanced ones (chains, forcing nets, uniqueness patterns); there it stops and offers to reveal one cell or the whole solution. Solve still finds the answer of every valid puzzle.
- Difficulty follows this tool’s own scale — the hardest technique needed — and may not match other books or apps.
- 4×4 puzzles are made in Easy only and 6×6 puzzles up to Hard: such small grids leave little room for the harder techniques.
- An Expert puzzle can take a few seconds to make, longer on an older phone; if one is not found within 25 seconds, making stops there and the page says how many were made.
- Standard Sudoku only: killer, jigsaw, diagonal and other variants are not supported.
- A 16×16 grid is wider than a phone screen, so it scrolls sideways there.
Privacy
Puzzles are solved, checked and made in your browser, in a background worker; nothing is uploaded. The last puzzle you entered and your print settings are kept in this browser’s storage, so they are still there next time.
Frequently asked questions
Can it solve any Sudoku?
Any standard 4×4, 6×6, 9×9 or 16×16 Sudoku. Solve uses an exact search (it narrows the possibilities down with the same logic a person uses, then tries the remaining options one by one), so it finds the answer even when no human technique applies, and it tells you when a puzzle has no solution or more than one. A 9×9 puzzle takes milliseconds; a hard 16×16 can take a few seconds.
How do I know my puzzle has only one solution?
Press Check. After finding one solution, the solver looks for a second; if there is one, the puzzle is not a proper Sudoku, and the cells where the two solutions differ are outlined — giving one of them as a clue narrows it down. A 9×9 puzzle with fewer than 17 clues never has exactly one solution: McGuire, Tugemann and Civario proved by an exhaustive computer search that no 16-clue Sudoku exists.
What do “candidates”, “naked” and “hidden” mean?
The candidates of an empty cell are the values its row, column and box still allow — the small numbers shown in step-by-step mode. A naked single, pair or triple is visible in the cells themselves (they hold only those candidates); a hidden one is visible in where a value can go (only those cells of a house can take it), even though the cells also show other candidates.
What is an X-Wing?
Suppose that in rows 3 and 9 the value 1 fits only in columns 3 and 9. Each of the two rows needs a 1 in one of those two columns, and the two rows cannot use the same column, so between them they place a 1 in column 3 and a 1 in column 9. No other cell of columns 3 or 9 can then be 1. The four cells form an X, hence the name; Swordfish and Jellyfish are the same idea with three and four rows.
Why does step by step stop before the end?
Either the puzzle needs a technique beyond the ones this tool explains, or it has more than one solution, so no logic can decide between them. You can then reveal one cell from the solution and carry on with Next step, or show the whole solution.
Can I print puzzles with an answer key?
Yes. In Make & print puzzles choose the size, difficulty and number of puzzles, 1, 2, 4 or 6 to a page, and A4 or US Letter paper, then press Download PDF. The answers come at the end, several to a page, with the original clues in black and the filled-in cells in blue. A puzzle you solved in Solve & check can be saved as a PDF too, with its solution on the second page.
Does it work for 6×6 and 16×16 puzzles?
Yes. 6×6 puzzles have six boxes of 2 rows × 3 columns and use 1–6; 16×16 puzzles have sixteen 4 × 4 boxes and use sixteen symbols, 1–9 then A–G or 0–9 then A–F (choose under the grid). Every technique works the same way on every size.