Sudoku Generator and Solver

Choose a level and get a fresh puzzle with a single correct answer. Fill it in on screen and check your numbers, print it, or show the solution. A solver below fills in a puzzle you type or paste.

New puzzle

Solve a puzzle

Type the numbers you have into the grid, or paste all 81 squares below using a dot or 0 for each empty square.

Worked examples

A known puzzle

530070000600195000098000060800060003400803001700020006060000280000419005000080079

Solution begins 534678912 672195348 198342567

This puzzle has a single solution, which the solver finds.

About Sudoku Generator and Solver

A sudoku is a nine by nine grid in which every row, column and three by three box must hold the numbers 1 to 9 once. This page makes a new one on request, at four levels, and checks your answers if you play it on screen. You can also print it, or show the solution when you give up.

Every puzzle has exactly one solution, which is what makes it a proper sudoku. To build one, the page fills a complete grid at random, then removes numbers one at a time, putting a number back if taking it out would allow a second answer. Easy keeps about 40 numbers, medium 32, hard 27 and expert 24. Below the generator is a solver. Type the numbers you have, or paste all 81 squares with a dot or zero for each empty one, and press Solve. It warns you if the puzzle breaks the rules, has no solution or has more than one.

How to use Sudoku Generator and Solver

  1. Choose a level and press New puzzle.
  2. Click a square and type a number from 1 to 9, and press Check my numbers to see any mistakes shaded red.
  3. Press Print to print the puzzle, or Show the solution when you want the answer.
  4. To solve a puzzle from elsewhere, type it into the solver grid or paste it, then press Solve.

Common uses

  • A fresh puzzle for the commute or a break
  • Printing a batch of puzzles for a class or a waiting room
  • Checking a newspaper sudoku that has got stuck
  • Testing whether a puzzle you made has a single answer

Frequently asked questions

How do I know the puzzle has only one answer?

Each number removed during construction is tested by counting solutions. If removing it would allow a second solution, the number is put back. The final puzzle has exactly one.

What is the difference between the levels?

The levels differ in how many numbers are given. Fewer given numbers means more to work out and usually harder logic, so expert gives about 24 and easy about 40.

Can the solver handle any puzzle?

Yes, any puzzle, however hard. It tries the square with the fewest options first and backtracks when stuck. It also reports a puzzle with no solution or more than one.

How do I paste a puzzle?

Write all 81 squares in reading order, using a digit for a given number and a dot or a zero for an empty square, then press Load pasted puzzle. Spaces and line breaks are ignored.

Does it save my game?

No. The puzzle and your numbers stay on the page until you leave or reload it. Print the puzzle if you want to finish it later.