Sudoku

Public domain classic

Fill every row, column and box with 1 to 9.

Sudoku

At a glance

Rules
Fill the 9 by 9 grid so each row, column and 3 by 3 box holds 1 to 9 once
Levels
Easy starts with 42 numbers given, Medium with 34 and Hard with 28
Players
Solo. There is no computer opponent
Controls
Tap a cell, then a number on the pad. Keys 1 to 9 fill, Backspace, Delete or 0 clear, arrows move and N switches notes. Esc pauses
Help
Pencil notes, Undo for the last 150 steps, and a Hint that writes in a correct number
Score
10,000 minus the seconds taken and 250 for each hint, never below 1
Saves
The puzzle in progress with its clock and hints, and your best score, in this browser only
Cost
Free, no account

How this Sudoku makes and checks puzzles

  • Each puzzle starts as a full grid filled at random by backtracking. Cells are then emptied one at a time in random order, and any cell whose removal would allow a second answer goes back in, until the level's clue count is reached. A try that stops short starts again, up to eight times.
  • In the rule test all 180 generated puzzles, 60 at each level, had exactly one answer and hit their level's clue count exactly. The slowest Hard puzzle took under half a second to make.
  • A number that repeats one in its row, column or box turns red. A wrong number that clashes with nothing is not marked.
  • Given numbers cannot be changed. The chosen cell's row and column are shaded, and every cell with the same number is lit.
  • The puzzle is solved the moment every cell is filled with no clash.

Notes, Undo and Hint

  • Notes: with Notes on, a number toggles a small pencil mark in an empty cell. On a cell that already holds a number, a tap replaces the number instead. Placing a number clears the notes in its own cell, but not the same mark in other cells of its row, column or box.
  • Undo: steps back through numbers, erasures and notes, up to 150 steps. The steps are not saved, so after a reload Undo starts from nothing.
  • Hint: fills the chosen cell with its answer. If that cell is given or already right, it jumps to the first cell, reading from the top left, that is empty or wrong. It writes a number even while Notes is on. Each hint costs 250 points and stays counted even if you undo it.

250 points is the same as 250 seconds on the clock. In the test, pressing Hint alone finished a Hard puzzle in 53 presses and scored the minimum of 1.

Saving and starting again

The puzzle is saved after every entry and once a second while you play. Close the tab, come back, press Play at the same level and it returns with its clock and hint count. The New button at the top opens the level menu, and Play there deals a fresh grid at the level you choose, which replaces the save. New puzzle on the pad does the same at once. A reload after New, before you press Play, still brings back the unfinished puzzle. Solving clears the save.

For a logic game with hidden mines, try Minefield.

Known limits

  • No check against the answer: only clashes show.
  • Undo history is lost on reload.
  • On a 390 by 844 screen each cell is 30 pixels across and the pad takes three rows under the grid.
  • At 1280 by 720 the grid is 570 pixels square inside an 848-pixel game area, so the pad sits below the window until you scroll.
  • The clock stops while paused or while another tab is open.
  • If storage is blocked, nothing is saved between visits.

How it was built and checked

AI tool
Codex
First committed
2026-10-14, in a batch of 10 classic games
Size
One HTML file of 170 lines, no game libraries
Rounds of changes
1 at build, from the build record. One fix since, on 2026-11-11: the top New button followed by Play brought back the saved puzzle, and now deals a fresh one at the chosen level
Checked at build
The build check made one puzzle at each level and confirmed one answer and a valid solution each time (42, 34 and 28 clues), checked Undo and the finish, and drew the screen against a stand-in page at three sizes. It names real browser rendering, physical touch input and full human playthroughs as not verified
Checked since
2026-11-11: a new rule test (952 checks covering 180 generated puzzles, clashes, the pad, notes, Undo, Hint, the score, saving and resuming, New then Play dealing a fresh grid, New puzzle, and keys and taps through the real input code), and an automated browser check of the local build at 1280 by 720 and 390 by 844. At desktop size it played Easy: picked a cell, added notes, placed numbers with the pad and a key, used Undo and an arrow key, reloaded the page and got the same puzzle back, then pressed Hint 38 times to finish and pressed Play Again. At phone size it chose Hard, placed and erased a number, finished with 53 hints and started again. After the New button was fixed it checked again at both sizes: a number placed, the page reloaded and the same puzzle back (desktop), then New and Play dealt a different Easy grid with 42 numbers given, and on desktop New, Hard and Play a grid with 28
Played on a phone
2026-11-11, a full game on a real phone before this page went live

Embed Sudoku on your site

Free to embed. Please keep the credit link.

<div style="position:relative;padding-top:75%;max-width:640px"><iframe src="https://aivibecodedgames.com/games/sudoku/" title="Sudoku (free browser game)" style="position:absolute;inset:0;width:100%;height:100%;border:0" loading="lazy" allow="fullscreen" allowfullscreen></iframe></div>
<p><a href="https://aivibecodedgames.com/play/sudoku/">Play Sudoku free</a> on AI Vibe Coded Games</p>

How it was vibe coded

ToolCodex
Rounds of changes: 1
First committed2026-10-14

The opening prompt

Make Sudoku. Generate valid puzzles with a unique solution at Easy, Medium, Hard clue counts (write a generator with backtracking and a uniqueness check). Features: pencil-mark notes toggle, highlight same numbers and conflicts, hint button, undo, timer, new puzzle, completion message. Save the current puzzle in localStorage. Mobile number pad.

What we learned

  • The top New button only reopened the level menu, and Play then brought back the saved puzzle, so New did not give a new grid. A test that presses New and then Play, and compares the two grids, shows it straight away.

Game controls

  • Tap a cell, then tap a number
  • Notes mode for pencil marks
  • Number keys and arrows work

The game brief includes touch controls for phones.

Open the game on its own

More games