Skip to content
ToolZone

Sudoku Generator

Generate a unique-solution sudoku puzzle at four difficulty levels, then export it as a printable PDF with a full answer key.

Runs in your browser. Nothing you enter or upload leaves your device.

Grid size

Difficulty

Generating puzzle...

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Sudoku Generator

This Sudoku Generator creates a brand-new puzzle every time, from a tiny 4x4 grid for young children to a demanding 16x16. Pick a size and difficulty, reveal the solution on screen when you want to check, and download a PDF with the puzzle on one page and the answer key on the next. Every puzzle has exactly one solution.

How it works

Generation happens in two stages. First, a complete valid grid is built by backtracking: cells are filled in order with values tried in random order, and whenever a cell has no legal value, the generator steps back and tries something else. Each row, column, and box (2x2, 2x3, 3x3, 3x4, or 4x4 depending on size) ends up containing every value exactly once.

Second, clues are removed from random cells one at a time. After each removal, a solver counts solutions; if there is still exactly one, the cell stays empty, otherwise the value is put back. Removal stops when the puzzle reaches the clue target for the chosen difficulty, for example 38 clues for Easy and 22 for Expert on 9x9. To keep generation quick, each check has a work limit, and a clue is kept whenever uniqueness can't be confirmed in time, so a puzzle may end up with a few more clues than the target.

How to use

  1. 1

    Under Grid size, choose 4x4, 6x6, 9x9 (Classic), 12x12, or 16x16.

  2. 2

    Under Difficulty, pick a level; a new puzzle is generated automatically.

  3. 3

    Click New puzzle for another one at the same settings. Copy link shares the exact puzzle, so a friend or class gets the same grid.

  4. 4

    Use Show solution to reveal the answers on screen, and Hide solution to go back.

  5. 5

    Click Download puzzle + answer key as PDF to print it.

Worked examples

First puzzle for a child

A 6-year-old learning the rules.

Input
4x4, Easy
Result
A 4x4 grid using 1 to 4 with about 10 of 16 cells filled in

Classic daily puzzle

An adult wants a standard sudoku.

Input
9x9 (Classic), Medium
Result
A 9x9 puzzle with around 30 clues and one unique solution

Giant puzzle

An experienced solver wants a long challenge.

Input
16x16, Hard
Result
A 16x16 grid using 1-9 and A-G, with roughly 135 of 256 cells given

A to G stand for 10 to 16.

Limitations
Difficulty is set by the number of clues, not by which solving techniques are needed, so two puzzles at the same level can feel different. Clue targets are goals rather than exact counts; a puzzle may keep a few extra clues when uniqueness can't be confirmed quickly. Large grids, especially 16x16, can take a moment to generate, and each PDF contains one puzzle.
Assumptions
Standard sudoku rules apply, with no diagonal or killer variants.
Privacy
Puzzles are generated in your browser and nothing is sent to a server or saved.

Frequently asked questions

How do larger grids like 16x16 represent numbers above 9?+

They use the letters A through G for the values 10 through 16, the standard convention for sudoku variants larger than the classic 9x9 grid.

Is every generated puzzle guaranteed to have only one solution?+

Yes, for every grid size. A cell is only emptied if the solver confirms the puzzle still has exactly one solution; if that can't be confirmed, the clue stays.

How many clues does each difficulty have?+

On 9x9 the targets are 38 (Easy), 30 (Medium), 25 (Hard), and 22 (Expert). Other sizes have their own targets, such as 10 and 6 for 4x4 Easy and Hard.

Can I see the answer without printing?+

Yes. Click Show solution to fill the grid on screen; the answers appear in a different color from the original clues.

What is the minimum number of clues for a 9x9 sudoku?+

Seventeen. It has been proven that no standard 9x9 sudoku with a unique solution has 16 or fewer clues.

Related tools