Sudoku Solver and Generator
ConvertEverything runs locally in your browser — nothing is uploaded
Three modes: solve, check and generate. Solving uses backtracking with bitmask candidate sets and can list every step together with the strategy used (naked single, hidden single, or a backtracking guess). Checking reports which rows, columns and boxes contain a repeated digit and exactly where, and says whether the grid has one solution, several, or none. Generating digs holes out of a complete solution and verifies uniqueness after every removal, so the puzzle it hands you has exactly one answer. ⚠️ Generation draws from the random source in lib/random.ts, never Math.random; supplying a seed reproduces the same puzzle. Everything runs locally in your browser; nothing is uploaded.
Features
- Paste nine lines to solve; . or 0 marks a blank, and an 81-character compact string works too
- Optional step-by-step solution naming the strategy used at each step
- Checking names the row, column and box of every repeated digit, down to the cell
- Says whether the grid is uniquely solvable, has several solutions, or none, stopping the search at 2
- Generates puzzles by digging holes and verifying uniqueness each time
- Three difficulties: easy, medium and hard
- A seed reproduces the same puzzle
- Illegal input and duplicate digits are reported with exact row and column
- Everything runs locally in your browser; nothing is uploaded
How to use
- Choose a mode: solve, check, or generate
- For solve and check, paste nine lines of nine cells, using . or 0 for blanks
- For generate, choose a difficulty and optionally a seed
- The result appears as you type, and every row can be copied
FAQ
- How do you know whether a puzzle has a unique solution?
- By backtracking search that stops after finding 2 solutions — an empty grid has about 6.67×10²¹ of them, so enumerating all would take centuries. For the question “is it unique”, the three answers 0, 1 and at least 2 are enough, so no more need to be listed.
- Why is a generated puzzle guaranteed to be unique?
- The generator digs holes out of a complete solution and immediately checks with that counter whether the puzzle is still unique after each removal; if not, the digit goes back. Without that step you would meet puzzles that look solvable but actually have several answers.
- What are the three strategies in the steps?
- Naked single: only one digit can go in that cell. Hidden single: a digit can only go in one cell of its row, column or box. Guess (backtracking): neither direct method progresses, so a digit is tried and the search backs out if it fails.
- Why does a grid with repeated digits stop the solver?
- Because a grid with duplicates has no solution at all; carrying on would only end with “no solution”, when the real problem is those repeated cells. The tool therefore points straight at the rows and columns involved.
Related tools
Coin Flip
GeneratorsFlip 1 to 1000 coins at once, label the two sides, and get each result plus counts and shares. Reproducible with a seed, all in your browser.
Random Number Generator
GeneratorsGenerate random integers or decimals with a chosen range, count and decimal places, plus deduplication, sorting and binary, octal or hex output.
Math Expression
WebEvaluate one expression per line: precedence and parentheses, powers and roots, trig and logs, plus reusable variables. No eval involved.
Timestamp Converter
ConvertConvert Unix timestamps into dates and back, telling seconds, milliseconds, microseconds and nanoseconds apart, with Windows FILETIME and decimals.
Date Calculator
ConvertCount the days, weeks or months between two dates, or shift a date by any of those. Dates can be picked from a calendar or pasted in — nothing is uploaded.
Number Base Converter
ConvertConvert numbers between binary, octal, decimal, hex, base 36 and base 64, with long IDs converted digit for digit. Runs in your browser.