Games

Sudoku

Pick a difficulty and a fresh puzzle is generated with exactly one solution. Pencil notes, hints and mistake checking are all there if you want them.

Time0:00
Mistakes0
Empty0

Tap a cell, then a number.

The whole game is a single small JavaScript file served from this site. There is no account, no server and no tracking of how you play — and once the page has loaded it works offline.

How to play sudoku

Fill the nine-by-nine grid so that every row, every column and every three-by-three box contains the digits 1 to 9 exactly once. The numbers printed in bold are given and cannot be changed. Tap a cell, then tap a number — or use the keyboard: arrow keys to move, 1–9 to enter, Backspace to clear.

Sudoku involves no arithmetic. The symbols happen to be digits, but they could equally be nine colours or nine letters. It is a pure constraint-satisfaction puzzle, and every valid puzzle can be solved by logic alone. If you are guessing, there is a deduction you have not spotted.

Pencil notes

Turn on notes and tapping a number adds it to a cell as a small candidate marker instead of committing to it. This is not optional at hard difficulty — it is how the game is played. Human solvers cannot hold nine candidate sets across eighty-one cells in working memory, and the standard techniques all operate on candidates rather than on final values.

The techniques, in the order you should learn them

Naked single. A cell where eight of the nine digits already appear in its row, column or box. Only one candidate remains, so that is the answer. Easy puzzles are solvable with nothing else.

Hidden single. A digit that can only go in one cell within a row, column or box — even though that cell has several candidates. Scanning for hidden singles is what separates a five-minute solve from a twenty-minute one, because they are easy to walk past.

Naked pair. Two cells in the same unit with identical two-candidate sets, say {3,7}. Between them they must use both digits, so 3 and 7 can be eliminated from every other cell in that unit. The same logic extends to naked triples and quads.

Pointing pair. If, within a box, a digit's only candidates lie in one row, then that digit must be in that box's portion of the row — so it can be removed from the rest of that row outside the box. This is the first technique that requires thinking about two units at once, and it is the main tool for hard puzzles.

X-Wing. When a digit's candidates in two rows are confined to the same two columns, those two rows must use those two columns for that digit, so it can be eliminated elsewhere in both columns. Rarely needed below expert level, but satisfying when it appears.

About the puzzle generator

Every puzzle is created fresh when you press New puzzle — nothing comes from a stored library, so you will never see the same grid twice. The generator first fills a complete valid grid using randomised backtracking, then removes numbers one at a time in random order. After each removal it counts the solutions, and if the count is anything other than exactly one, the number is put back.

That uniqueness check matters. A puzzle with multiple solutions is not a sudoku; at some point it forces you to guess, and guessing is exactly what a good puzzle should never require. Plenty of free puzzle sources skip this check, which is why you occasionally hit a "sudoku" that dead-ends.

Difficulty here is expressed as the number of given digits, which is an honest but rough proxy. Fewer givens generally means harder, but the arrangement matters too — a 28-given puzzle can occasionally be easier than a 32-given one if the givens happen to be well distributed. It is worth knowing that 17 is the proven mathematical minimum: a 2012 exhaustive computer search established that no valid unique-solution sudoku exists with 16 or fewer clues.

Hints, checking and mistakes

The hint button fills in one correct cell — the selected one if it is wrong or empty, otherwise a random unsolved cell. The check button marks any incorrect entries in red without revealing what should be there. The mistake counter increments whenever you enter a wrong digit, so you can see afterwards whether a slow solve was careful or lucky.

None of this is enforced. There is no score, no streak to protect and no leaderboard, because a leaderboard would mean identifying you. Use the hints freely — they are there to teach, not to punish.

Where sudoku came from

The puzzle's ancestor is Latin squares, formalised by Leonhard Euler in the eighteenth century. The modern form with the added box constraint was published in 1979 by Howard Garns, a retired American architect, in Dell Pencil Puzzles & Word Games under the name Number Place. It found a much larger audience in Japan from 1984, where Nikoli published it as sūji wa dokushin ni kagiru — "the digits must be single" — shortened to sudoku. It reached worldwide popularity in 2004 when Wayne Gould persuaded The Times of London to print his computer-generated puzzles.

Frequently asked questions

Is every sudoku puzzle here guaranteed to have one solution?

Yes. After each digit is removed during generation, the puzzle is re-solved and the number of solutions counted. If removing it would allow more than one solution, the digit is put back. That means every puzzle is solvable by pure logic with no guessing.

What is the minimum number of clues a sudoku can have?

Seventeen. A 2012 exhaustive computer search by Gary McGuire and colleagues proved that no valid sudoku with a unique solution exists with 16 or fewer given digits. The Expert setting here uses 24, which is already demanding.

Do I need to be good at maths to play sudoku?

No. There is no arithmetic anywhere in sudoku — no addition, no multiplication. The digits are just nine distinct symbols and could equally be colours or letters. It is a logic puzzle about constraints.

What are pencil notes for?

Recording which digits are still possible in a cell. Every intermediate and advanced technique — naked pairs, pointing pairs, X-Wings — works by eliminating candidates, so notes are effectively required beyond easy difficulty. No human holds that much state in their head.

How do I get better at hard sudoku?

Learn hidden singles thoroughly first — most people leave them on the board. Then naked pairs, then pointing pairs, which is the technique that unlocks most hard puzzles. Work through one technique at a time rather than trying to learn them all at once.

Are the puzzles the same for everyone?

No. Each one is generated in your browser the moment you press New puzzle, so your grid is almost certainly unique to you. Nothing is downloaded from a puzzle library and nothing about your solve is sent anywhere.