Sudoku generator with guaranteed unique solutions
This sudoku generator builds classic 9×9 puzzles and gentler 6×6 grids for children, each checked to have exactly one solution before it is shown to you. Pick a difficulty from easy to expert, play straight away on screen with pencil marks and a mistake checker, or print a batch of puzzles as a PDF with answer keys at the back.
It suits teachers printing warm-up sheets, puzzle fans who want a fresh grid every morning, and anyone travelling without a signal. Because the generator is seeded, the same seed and settings always reproduce the same puzzles — share the seed with a friend and you are solving the identical grid.
Everything runs in your browser: generation, the uniqueness check, the PDF (drawn as vector graphics with pdf-lib) and the PNG export. Nothing is uploaded.
How to use the Sudoku Generator
- Choose the Grid — 9×9 classic or 6×6 kids — and a Difficulty.
- Set how many Puzzles in the PDF you want (1–24), and type or shuffle a Seed if you want reproducible puzzles.
- Press Generate puzzles. The first puzzle appears on the board; use the arrows to move between puzzles.
- Play on screen: click a cell and type a digit, or use the number pad. Toggle Pencil marks (or press P) to note candidates, press Check to mark mistakes in red, or Show solution.
- Set Paper, Orientation and Puzzles per page, then Print, Download PDF or save a page as PNG. Answer keys are added as separate pages.
- Copy the Puzzle string to save a puzzle as text, or open it in the Sudoku Solver for hints.
Sudoku Generator features
Exactly one solution
Cells are removed one at a time and a backtracking solver confirms after every removal that only one solution remains — a puzzle is never ambiguous.
Four difficulty levels
Easy, medium, hard and expert differ in how many givens are left: roughly 40, 34, 29 and 25 clues on a 9×9 grid.
6×6 grids for beginners
Kids’ puzzles use digits 1–6 and 2×3 boxes, with the same uniqueness guarantee and the same print layouts.
Seeded and reproducible
The seed drives the random generator, so “daily-1” gives the same four medium puzzles on every device.
Play with pencil marks
Keyboard and on-screen number pad, candidate notes in each cell, a checker that only marks wrong digits, and a reveal button.
Printable batches
One, two or four puzzles per page on A4 or Letter, portrait or landscape, with compact answer keys on the final pages; export as PDF or PNG.
How the puzzles are made
The generator first fills a complete grid by choosing, for the most constrained empty cell, a random digit that does not clash with its row, column or box — a randomised backtracking fill. It then visits the cells in random order and tries to blank each one. After each removal it runs a solver that stops as soon as it finds a second solution; if a second solution exists the digit is put back. Removal stops when the difficulty’s target number of givens is reached or no further cell can be removed safely.
Difficulty here is measured by the number of givens, which is the most common approach in printed puzzle books. A 25-given expert grid usually needs advanced techniques such as X-wings or forcing chains; a 40-given easy grid can be completed with naked and hidden singles alone. Sudoku has been proved to need at least 17 givens for a unique solution, so even expert puzzles stay well above that floor.
Printing tips
- Two puzzles per page in portrait is the most readable layout for 9×9 grids; four per page suits 6×6 kids’ puzzles or anyone who likes small grids.
- Choose landscape with two per page for a wide, book-style spread.
- Answer keys are grouped six (portrait) or eight (landscape) to a page so a 24-puzzle batch needs only four key pages.
- The PDF is vector, so it prints crisply at any size. Print at 100% / Actual size so the cells stay large enough to write in.
- Need a puzzle from a newspaper solved? Paste it into the Sudoku Solver. For other printable puzzles try the Word Search Maker and Maze Generator.
Difficulty guide
| Level | 9×9 givens | 6×6 givens | Typical techniques |
|---|---|---|---|
| Easy | about 40 | about 20 | Naked singles, scanning rows and boxes |
| Medium | about 34 | about 16 | Hidden singles, pencil marks help |
| Hard | about 29 | about 13 | Naked pairs, pointing pairs, box-line reduction |
| Expert | about 25 | about 10 | X-wing, swordfish or careful trial and error |
Sudoku Generator FAQ
Does every puzzle from this sudoku generator have one solution?
Yes. The uniqueness check is part of generation: a digit is only removed when the solver confirms a single solution still exists.
How do I get the same puzzle again?
Keep the same seed, grid size, difficulty and number of puzzles. The seed drives all the randomness, so the batch is identical every time.
Can I print the puzzles without the answers?
The answer keys are on separate pages at the end of the PDF, so print only the first pages, or print the puzzle page as a PNG.
What is the 6×6 grid?
A smaller sudoku using digits 1–6 with boxes of 2 rows × 3 columns. It is ideal for children and beginners because the same logic applies with fewer possibilities.
Why does “Check” not fill in answers?
Check only highlights digits that differ from the solution so you can keep solving. Use “Show solution” when you want the whole grid filled.
Is the puzzle sent anywhere?
No. Generation, checking and the PDF are all done in your browser; nothing leaves your device.