Search for a tool
Sudoku Solver

Tool/Solver to resolve sudoku/wordoku grids (directly or step by step). The aim of the sudoku game is to fill the rows and columns of a 9x9 grid with each digit only once.

Results

Sudoku Solver -

Tag(s) : Number Games

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Sudoku Solver' tool for free! Thank you!

Sudoku Solver

Solve a sudoku grid


Loading...
(if this message do not disappear, try to refresh this page)






9x9 Sudoku generator (to solve)

Answers to Questions (FAQ)

What is a Sudoku? (Definition)

Sudoku is a logic puzzle consisting of filling a 9x9 grid with the digits 1 through 9. Each digit must appear exactly once in each row, each column, and each of the nine 3x3 blocks.

Variations exist with different grid sizes or with symbols (letters, icons). The mathematical structure remains the same: it is a constraint satisfaction problem where each symbol must adhere to local uniqueness rules.

How to fill the Sudoku grid?

The grid can be filled by copying and pasting a sequence of 81 characters (numbers or symbols), or by directly entering the values into the cells.

The numbers $ 1 $ to $ 9 $ are accepted. For Wordoku-style variants, letters can also be used, provided that 9 distinct symbols are employed.

Example: Copy the Sudoku content in the first cell (top left) 97 1 5 5 9 2 18 4 8 7 26 92 3 6 2 9 19 4572 to get:

9715
5921
84
8
7
269
236
29
194572

How does the step by step works?

The program solves 9x9 Sudoku puzzles like a human would, by combining logical deductions.

— Candidate calculation: For each empty cell, dCode determines the set of possible values compatible with the row, column, and block constraints.

Only possible value: If a cell has only one candidate, that value is validated.

Only possible cell: If, for a given number, only one cell in a row, column, or block can contain it, that value is validated.

When no further direct deductions are possible, the solver uses backtracking. It selects a cell with a minimal number of candidates, tests a value, and then continues the deductions. If there is an inconsistency (no solution), it goes back and tries another value. The choice is not random: it relies on heuristics designed to reduce the search tree and speed up the solution. This method is the fastest for the solver; it is possible that sometimes a slower, complex deduction could achieve the same result.

What is a block of Sudoku?

In a standard 9x9 grid, a block (also called a region, group, sector, or subgrid) is a 3x3 square. There are 9 blocks in total.

How to test if a sudoku has a unique solution?

dCode calculates all the solutions for the sudoku, not only the first one. To check a homemade sudoku, the solver can confirm that there is only one solution.

When was Sudoku invented?

The modern form of Sudoku was published in 1979 by Howard Garns in the American magazine Dell under the name Number Place.

The game was later popularized in Japan in the 1980s by the Nikoli company, which named it Sudoku, a contraction of Sūji wa dokushin ni kagiru, meaning numbers must remain unique.

How many distinct sudokus exist?

A single row can consist of $ 9! $ (Factorial of 9) different ways, same for the columns, but the whole sudoku has a number of possibilities much less than $ 9!^9 $, because some permutations can lead to identical grids. The total number of grids is $ 9! \times 72^2 \times 2^7 \times 27704267971 = 6670903752021072936960 $ combinations (result demonstrated in 2005).

What is the minimum number of starting squares for a unique solution?

For a sudoku to have only one solution, it must have at least 17 pre-filled boxes out of the 81 total. Gary McGuire and his team proved this here by using an algorithm to perform a systematic computer search. They first cataloged the 5,472,730,530 distinct sudoku puzzles. Next, they created a program to check whether sudoku puzzles with 16 pre-filled squares had a unique solution. Their exhaustive search found no sudoku with only 16 pre-filled squares having a unique solution, thus confirming the minimum number of 17 pre-filled squares needed.

Does a rectangular sudoku or non square sudoku exist?

By keeping the sudoku NxN rules that require the N characters to be used on each row and column, then it is impossible to respect them if the sudoku is not square.

Some variants of the square sudoku, however, use non-square inner blocks (see sudoku 6x6, sudoku 7x7 or sudoku 8x8)

Source code

dCode retains ownership of the "Sudoku Solver" source code. Any algorithm for the "Sudoku Solver" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Sudoku Solver" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Sudoku Solver" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Sudoku Solver" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/sudoku-solver

In a scientific article or book, the recommended bibliographic citation is: Sudoku Solver on dCode.fr [online website], retrieved on 2026-03-11, https://www.dcode.fr/sudoku-solver

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Sudoku Solver' tool for free! Thank you!


https://www.dcode.fr/sudoku-solver
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback