GameParticles
Games

How to Solve Sudoku: A Step-by-Step Routine for Any Grid

How to solve Sudoku step by step: scan for the easy digits, add pencil marks the right way, repeat a simple loop, and use a checklist whenever you get stuck.

Updated

To solve a Sudoku, repeat one loop: scan for digits that have only one possible cell, place them, and rescan the row, column and box you just changed. When scanning stops working, write pencil marks, use them to remove candidates, and return to scanning. You never need to guess.

This page is a routine to follow. The rules are in how to play Sudoku, and each named technique is explained in the Sudoku strategy guide.

Step 1: scan digit by digit

Take the digit 1. Look at every 3x3 box that does not contain a 1 yet. For each of those boxes, rule out the rows and columns that already hold a 1 elsewhere in the grid. If only one empty cell in the box survives, place the 1 there.

Then do the same for 2, then 3, up to 9. This is called cross-hatching.

Worked example. Box 2, the top middle box, has no 6. There is a 6 in row 1 over in box 1, and a 6 in row 3 over in box 3. That leaves row 2 of the box: r2c4, r2c5 and r2c6. Column 4 has a 6 lower down, and r2c5 already holds a given. The 6 goes in r2c6.

Two habits make this step faster:

  • Start with the digits that appear most often. A digit already placed six or seven times has very few cells left.
  • When a box narrows a digit down to two cells in the same row or column, remember it. That alone can rule the digit out of the neighboring boxes along that line.

Step 2: finish the crowded units

Now look at units instead of digits. Find any row, column or box with only one, two or three empty cells.

  • One empty cell: it takes the only missing digit.
  • Two empty cells: note the two missing digits, then check whether one of them is blocked from one of the cells by its other units. If so, both cells are solved.
  • Three empty cells: the same check usually places at least one digit.

Worked example. Row 5 is missing 2 and 8, at r5c1 and r5c9. Column 1 already contains an 8. So r5c1 is 2 and r5c9 is 8.

Step 3: loop until nothing moves

Every digit you place changes three units. Go back to step 1 for that digit and to step 2 for those three units. On an easy grid, this loop finishes the puzzle with no notes at all. Keep cycling until a full pass through digits 1 to 9 places nothing.

Step 4: add pencil marks

When the loop stalls, stop relying on memory. There are two ways to mark up the grid, and it pays to use them in order.

Light marking first. In each box, for each missing digit, if the digit can go in exactly two cells, write it small in both. Skip digits with three or more options. This approach is often called Snyder notation. It keeps the grid readable and makes pairs obvious: two cells in a box that carry the same two small digits must hold those two digits.

Full marking when needed. If light marks do not break the puzzle open, fill in every candidate for every empty cell. For each cell, start from 1 to 9 and cross off whatever appears in its row, column and box. It is slow, but from here the grid tells you everything.

Accuracy matters more than speed in this step. One missing candidate will lead to a wrong digit many moves later.

Step 5: use the marks

With candidates written in, check for these in order, and return to step 1 the moment you place a digit.

  1. A cell with a single candidate. That is the answer for the cell.
  2. A digit that appears as a candidate in only one cell of a row, column or box. Place it, whatever else that cell lists.
  3. Two cells in a unit with the same two candidates and nothing else. Remove those two digits from the other cells of the unit.
  4. A digit whose candidates within a box all lie in one row or column. Remove that digit from the rest of that row or column outside the box.

Worked example of item 3. In column 8, two cells read 3 and 7 only. A third cell in the column reads 3, 5 and 7. Since the 3 and 7 are claimed by the pair, the third cell is 5.

After every placement, erase that digit from the notes of all cells in the same row, column and box. Out-of-date notes are the most common reason a solve goes wrong.

The stuck checklist

When you have stared at the grid for a few minutes and nothing gives, run this list from the top.

  1. Are the notes correct? Pick a few cells and recompute their candidates from scratch. Fix any that include a digit already present in the row, column or box.
  2. Hidden singles by unit. Go through all nine rows, then all nine columns, then all nine boxes, asking for each missing digit: how many cells can take it? If the answer is one, place it.
  3. Pairs. Look at every cell with exactly two candidates and check its units for a twin.
  4. Lines within boxes. For each digit, check whether its candidates in any box sit on a single line, then remove it from the rest of that line.
  5. The reverse. For each digit, check whether its candidates in any row or column sit inside a single box, then remove it from the rest of that box.
  6. Harder patterns. Hidden pairs, triples and X-Wing are described in the strategy guide.
  7. Step away. A two-minute break finds more missed singles than another ten minutes of staring.

Guessing is not on the list. A guess that turns out wrong is rarely discovered at once, and unwinding it costs more than the search would have.

Following the routine in our game

In Sudoku on GameParticles, press N or use the notes button to switch between placing digits and writing pencil marks. When you place a digit, matching notes in the same row, column and box are removed automatically, which takes care of the clean-up in step 5.

A wrong digit turns red immediately and counts as one of three mistakes, so you will know at once if a deduction was off. Undo with U to take it back. Each game also has three hints: select the cell you are stuck on and press H to reveal it. Used sparingly, a hint on the right cell restarts the loop. Easy puzzles begin with about 43 digits filled and Expert with about 25, so move up a level once steps 1 to 3 feel automatic.

Try it

Open a Medium puzzle in Sudoku and work the steps in order: digits, crowded units, loop, light notes, full notes. Keep the checklist nearby for the first few solves. After that it becomes habit.

Frequently asked questions

What is the best way to solve Sudoku for beginners?

Follow a fixed routine. Scan each digit from 1 to 9 across the boxes and place any that have only one possible cell. Fill nearly complete rows, columns and boxes. When that stops working, add pencil marks and look for cells with a single candidate.

Should you guess in Sudoku?

No. A properly made Sudoku has one solution that can be reached by logic alone. If you feel forced to guess, a simpler deduction has been missed somewhere, usually a hidden single or an out-of-date pencil mark. Recheck your notes before anything else.

When should you start using pencil marks in Sudoku?

Start when scanning no longer produces digits. On easy puzzles that may be never. On harder ones, first mark only digits that have exactly two possible cells in a box, then switch to full candidate lists if you are still stuck.

What do you do when you get stuck on a Sudoku?

Verify your pencil marks against the current grid, then scan again for hidden singles in every row, column and box. Next look for pairs and for a digit confined to one line within a box. If nothing appears, take a short break.

More games guides

JSON Formatter
Developer · Format, validate and minify JSON with syntax highlighting.
↵
Base64 Encode / Decode
Developer · Encode text to Base64 or decode Base64 back to plain text.
↵
URL Encoder / Decoder
Developer · Encode or decode URL components and query strings.
↵
Hash Generator
Developer · Generate MD5, SHA-1, SHA-256 and SHA-512 hashes.
↵
UUID Generator
Developer · Generate UUIDs v4 (random) in bulk with one click.
↵
Regex Tester
Developer · Test regular expressions against text with live match highlighting.
↵
Word Counter
Text · Count words, characters, sentences, paragraphs and reading time.
↵
Case Converter
Text · Convert text between UPPER, lower, Title, camelCase, snake_case and more.
↵
List Sorter
Text · Sort, reverse, deduplicate and shuffle lists of text.
↵
Markdown Preview
Text · Write Markdown and see a live rendered preview side by side.
↵
Percentage Calculator
Numbers · Calculate percentages, increases, decreases and what % one number is of another.
↵
Color Converter
Colors · Convert colors between HEX, RGB, HSL and HSV instantly.
↵
Snake
Arcade · Eat food, grow longer, don't hit the walls. A timeless classic.
↵
2048
Puzzle · Slide tiles and combine them to reach the legendary 2048 tile.
↵
Word Grid
Puzzle · Guess the hidden five letter word in six tries using color clues.
↵
Sudoku
Puzzle · Fill the 9x9 grid with logic. Four difficulties from easy to expert.
↵
Minesweeper
Strategy · Use number clues to clear the minefield. Classic logic, three levels.
↵
Breakout
Arcade · Smash every brick with paddle and ball. Power-ups, combos, endless levels.
↵
Typing Practice
Casual · Build your WPM and accuracy with timed drills from 30 seconds to 5 minutes. Find your weak keys.
↵
TypeRunner
Arcade · Multiplayer typing race. Race friends by link, beat computer runners, or chase your own ghost.
↵
Typing Blocks
Arcade · Type each word before its wooden block lands. Miss, and the pile climbs toward the line.
↵
Bubble Shooter
Arcade · Aim, bank shots off the walls, and pop groups of three or more bubbles.
↵
Road Rush
Arcade · Race seven rivals through traffic and punch your way to the front.
↵