You're not signed in

Language

Sign in
← Sudoku

How to play sudoku

A sudoku is a 9×9 grid, split into nine boxes of 3×3 cells. Some cells already hold a digit. Fill in the rest so that every row, every column and every box contains each digit from 1 to 9 exactly once.

The rules

  • Every row holds the digits 1 to 9, each once.
  • Every column holds the digits 1 to 9, each once.
  • Every box (the 3×3 squares with the thick lines) holds the digits 1 to 9, each once.

The given digits can't be changed. Every sudoku on Nonojs has exactly one solution and can be solved by logic alone, with the techniques below. Its difficulty says which ones you need: Easy only singles, Medium also pointing, claiming, pairs and triples, Hard also X-Wing, XY-Wing and swordfish.

The digits a cell could still hold are its candidates. Many players write them into the cells as small pencil marks: on Nonojs, turn on Notes (or press N, or hold Shift with a digit). When you place a digit, Nonojs removes it from the pencil marks in its row, column and box.

Reading the examples

Every example is a real moment from solving a puzzle on Nonojs. Rows are numbered from top to bottom, columns from left to right, and boxes from 1 at the top left to 9 at the bottom right. Blue digits were found earlier. The lightly tinted cells are the rows, columns or boxes the technique looks at, the strongly tinted cells its pattern. Candidates that are ruled out are red and struck through.

Easy: singles

Singles place a digit. Easy puzzles need nothing else, and every puzzle is finished with them.

Hidden single

Pick a digit and a row, column or box that still needs it. Check which of its empty cells could take the digit: a cell can't if the same digit already sits in its row, column or box. If only one cell is left, the digit goes there.

Row 2 needs a 4. The circled 4s rule out every other empty cell of the row, so the 4 goes in column 3.

Naked single

Look at one empty cell and collect the digits in its row, column and box. If they contain eight different digits, the ninth is the only one left for the cell.

Row 6, column 9: its row, column and box already hold every digit except 7.

Medium: candidates

When no single is left, write down the candidates. The following techniques place nothing themselves. They rule out candidates, until a single appears again.

Pointing

If a digit's candidates in a box all lie in one row (or column), the box's digit will be in that row. So no other cell of the row, outside the box, can hold it.

In box 5, the 5 can only go in row 5 (columns 4 and 6). So the rest of row 5 can't hold a 5: it is ruled out in column 9.

Claiming

The other way round: if a digit's candidates in a row (or column) all lie in one box, the row's digit will be in that box. So no other cell of the box can hold it. This is also called a box-line reduction.

In column 3, the 2 can only go in rows 7 and 9, both in box 7. So box 7 has its 2 in column 3, and 2 is ruled out in row 9, column 2.

Naked pairs and triples

If two cells of a row, column or box have the same two candidates and no others, these two digits go into these two cells, in some order. No other cell of that row, column or box can hold them. The same works with three cells whose candidates together are only three digits: a naked triple.

Rows 2 and 9 of column 5 can only hold 2 and 7. Those two digits go there, so 7 is ruled out in row 3, column 5.

Hidden pairs and triples

If two digits fit in only the same two cells of a row, column or box, these two cells hold these two digits. Any other candidate in them can go. A hidden triple works the same with three digits that fit in only three cells.

In column 3, the 1 and the 5 fit only in rows 5 and 9. These cells hold 1 and 5, so 6 is ruled out in row 5.

Hard: patterns across the grid

Hard puzzles need patterns that combine several rows and columns.

X-Wing

Find two rows in which a digit fits in exactly two cells, and these cells lie in the same two columns. The two digits take one of these columns each, whichever way round. So the digit is ruled out in every other cell of both columns. The same works with columns and rows swapped.

In rows 3 and 8, the 7 fits only in columns 3 and 9. The two 7s take these columns, so 7 is ruled out in row 9, column 9.

XY-Wing

Three cells with two candidates each: a middle cell with candidates X and Y, and two cells it sees, one with X and Z, the other with Y and Z. Whichever digit the middle cell gets, one of the other two becomes Z. So Z is ruled out in every cell that sees both of them.

Row 1, column 3 is 1 or 3. If it is 1, row 8, column 3 is 5; if it is 3, row 1, column 9 is 5. Row 8, column 9 sees both, so it can't be 5.

Swordfish

An X-Wing with three lines: in three columns, a digit fits only in cells that lie in the same three rows. The three digits take these rows, so the digit is ruled out in every other cell of these rows. The same works with rows and columns swapped.

In columns 1, 5 and 7, the 8 fits only in rows 1, 6 and 7. These 8s take the three rows, so 8 is ruled out in row 1, column 8.

Tips

  • Start with the digits that are already placed most often: they leave the fewest cells open.
  • Look for singles first, every time. The harder techniques are only needed when no single is left.
  • A digit shown in red repeats in its row, column or box. Only rule conflicts are shown, not wrong digits, so check your reasoning when you get stuck.