Free X Sudoku Solver

Enter any 9x9 X Sudoku puzzle and get the solution instantly. The solver checks rows, columns, boxes, and both diagonals.

Written and built by Brian Hamilton. Reviewed by Karan Hamilton.

Brian handles the technical puzzle logic, while Karan checks the page for clarity, usability, and player experience.

Puzzle tools are tested in the browser against Sudoku rules, example grids, and common player workflows. See how we make and test puzzles, our editorial standards, or report a problem.

X Sudoku Solver for Diagonal Sudoku Puzzles

Our X Sudoku Solver helps you solve diagonal Sudoku puzzles online, check difficult grids, and understand how the two extra diagonals change the logic. X Sudoku, also called Diagonal Sudoku or Sudoku X, uses the normal 9x9 Sudoku rules plus one important addition: both long diagonals must contain the digits 1 to 9 exactly once. That extra rule looks small, but it can completely change the solving path.

Use this tool when you have an X Sudoku from a book, newspaper, app, or handmade puzzle and want to verify the answer — or head to play X Sudoku if you would rather solve a fresh one yourself. You can type the givens into the grid, paste an 81-character puzzle string, reveal the full solution, step through one cell at a time, and check whether the puzzle has a unique solution. The solver runs in your browser, so the puzzle does not need to be uploaded anywhere.

Quick rule

In X Sudoku, every row, column, 3x3 box, and both main diagonals must contain 1–9 once. The diagonal from top left to bottom right and the diagonal from top right to bottom left behave like two extra Sudoku units.

How to Use the X Sudoku Solver

Start by entering the givens exactly as they appear in your puzzle. Leave blank cells empty, or use 0 and dots if you are importing a puzzle string. After the grid is entered, click Solve to fill the whole answer, or use Step to reveal a single cell without spoiling the rest.

If you are checking a puzzle you created, watch for the uniqueness message underneath the grid. Note that it only appears after Solve — Step fills cells but never reports how many answers exist, so a puzzle you only ever stepped through has not been checked. A diagonal Sudoku can be perfectly valid and still have several solutions if the clues are too weak. A published X Sudoku should have exactly one, and this is where you confirm that before you share or print it.

X Sudoku Rules Explained

X Sudoku begins with classic Sudoku. Each row must contain digits 1 to 9, each column must contain digits 1 to 9, and each 3x3 box must contain digits 1 to 9. The X rule adds two diagonal units. The main diagonal runs from the top-left cell to the bottom-right cell. The anti-diagonal runs from the top-right cell to the bottom-left cell. Each diagonal must also contain every digit once.

The centre cell belongs to both diagonals, so it is often strategically important. A digit placed on one diagonal can remove candidates from the rest of that diagonal, even when it has no direct row, column, or box relationship with those cells. This is what gives X Sudoku its distinctive feel: familiar rules, but with extra long-range pressure.

How the diagonals change the solving path

In ordinary Sudoku, a digit affects its row, column, and box. In X Sudoku, a diagonal digit may affect cells across the entire board. That means a puzzle can be solved through deductions that do not exist in classic Sudoku. A candidate might look possible by row, column, and box, but disappear because the same digit is already forced on a diagonal.

The diagonals also create new hidden singles. If a digit can only appear in one cell along a diagonal, that placement is forced even if the row and box still look open. When you are stuck, scanning the two diagonals as full units is often the fastest way to restart progress.

Begin with normal Sudoku basics: scan rows, columns, and boxes for singles and obvious placements. Then do a dedicated diagonal pass. List which digits are missing from each diagonal and compare them with the row, column, and box restrictions on diagonal cells. This often reveals candidates that are impossible only because of the X rule.

After every diagonal placement, update related candidates immediately. A number placed on a diagonal affects eight other cells along that diagonal, plus its row, column, and box. That is a lot of impact from one move, and missing it can make the puzzle feel harder than it is.

What the diagonals are actually worth

It is easy to describe the X rule as a small addition. Here is what it is worth, measured on two grids we generated and then counted solutions for under both rule sets.

The diagonals doing the work — before The diagonals doing the work — the pattern. Ignore the diagonals and this grid has two valid completions. Apply them and it has exactly one. The X rule is not decoration here — it is the whole puzzle.. 8 2 7 9 8 4 2 1 9 8 4 1 6 9 4 6 6 2 3 1 8 3 2 3 7 9 2 4 5 6 9
Thirty-one givens. Under ordinary Sudoku rules this grid has two valid completions, so it is not a puzzle at all — no amount of logic picks between them. Add the requirement that both shaded diagonals hold 1–9 and it has exactly one. The diagonals are not decoration here; they are the entire puzzle.

The mechanism is reach. A digit placed on a diagonal removes itself from eight other cells strung across the whole board, cells it has no row, column or box relationship with. In ordinary Sudoku nothing travels that far. That is why one diagonal placement often unlocks several ordinary deductions immediately afterwards, and why a dedicated diagonal pass is the fastest way to restart when you are stuck.

The most useful X Sudoku pattern is a diagonal hidden single: a digit missing from a diagonal can only fit in one diagonal cell. Diagonal pairs are also powerful. If two cells on the same diagonal can only contain the same two digits, those digits can be removed from every other cell on that diagonal.

Look for intersections between diagonals and boxes too. A diagonal passes through three 3x3 boxes in a visible way, and the centre box contains the shared centre cell. If a digit is restricted to diagonal cells inside one box, it may create eliminations both along the diagonal and inside the box. These overlaps are where X Sudoku often becomes easier than it first looks.

What the Step button really does

Worth knowing before you lean on it. Step does not reason its way forward. It solves the whole grid in the background first, then fills the next empty cell in reading order — left to right, top to bottom — copying from the answer it already holds. It names the row, the column and the digit, and says nothing about why.

That still leaves it useful, for a narrower job than it looks. Step is for unsticking: reveal one cell, then work out yourself which row, column, box or diagonal forced it. If the cell sits on a diagonal, ask whether the X rule was the decisive constraint — that question is where the learning is, and the tool will not ask it for you. What it will not do is find the interesting deduction: the first cell it fills is simply the top-left empty one.

Done that way you do start seeing diagonal singles, diagonal pairs and diagonal eliminations before you reach for the solver. But the coaching is yours, not the button's.

Checking and building your own X Sudoku

If you create your own puzzles, an X Sudoku solver is almost essential. It is easy to design a grid that looks elegant but has more than one solution. The extra diagonal rules can make a puzzle stronger, but they can also hide ambiguity if the clues are not balanced across the grid.

After entering your handmade puzzle, check that it solves and that the solution is unique. If there are multiple solutions, add or adjust clues near the weak area. If there is no solution, look for a copied digit, a repeated diagonal value, or a clue that conflicts with a row, column, box, or diagonal.

Our generator does not make diagonal puzzles, but the printable X-Sudoku sets are 100 puzzles apiece with the answers in the back if you want ready-made ones to study. When designing your own, spread clues across the whole grid instead of loading only the diagonals. The diagonals are powerful, but they should interact with rows, columns, and boxes rather than carry the entire puzzle alone. A balanced puzzle gives solvers several entry points and avoids a grid that collapses too quickly.

After removing clues, test the puzzle repeatedly. Check that it has one solution, then solve it manually or use step mode to see whether the route feels fair. If the puzzle requires guessing, add a clue near the ambiguous area. If it solves too easily, remove a clue that was doing too much work.

Importing and Exporting Puzzle Strings

An 81-character string is a compact way to store or share a 9x9 Sudoku puzzle. Each character represents one cell, reading left to right and top to bottom. Digits represent givens, while 0 or a dot represents a blank cell. This format is useful when copying puzzles between tools or saving a puzzle for later.

When importing an X Sudoku string, remember that the string itself may not say it is diagonal. The same givens can behave differently under classic Sudoku rules and X Sudoku rules. Always use the X Sudoku solver when the two diagonals are part of the puzzle.

Why a normal Sudoku fails in this solver

This is the most common surprise on this page, and it is easier shown than explained.

A classic Sudoku that breaks the X rule — before A classic Sudoku that breaks the X rule — the pattern. eliminations in R3C3, R5C5. Perfectly legal as ordinary Sudoku — one solution. Under the X rule it has none, because R3C3 and R5C5 both hold 2 and both sit on the main diagonal.. 7 8 6 4 2 6 1 7 3 2 7 6 9 9 3 2 5 6 5 4 9 8 7 5 8 4 4 7 7 3
A legal ordinary Sudoku — thirty givens, exactly one solution in the classic solver. Paste it here and you get no solution, because R3C3 and R5C5 both hold a 2 and both sit on the main diagonal. Nothing is wrong with the puzzle; it was simply never built to obey the X rule.

So if a grid solves elsewhere and fails here, that is usually the answer: it is not an X Sudoku. Check the source before assuming the solver is broken. Conversely, a grid that has several classic solutions may well be a perfectly good X Sudoku — the diagonals are what pin it down.

Common X Sudoku Mistakes

The most common mistake is forgetting one of the diagonals. Solvers often check the visible row, column, and box, then place a digit that quietly duplicates a value on a diagonal. Another mistake is treating the centre cell like an ordinary square. Because it belongs to both diagonals, it can be more constrained than it first appears.

When the solver says a puzzle has no solution, check the diagonal clues carefully. A repeated digit on either diagonal is enough to break the puzzle. Also confirm that you did not import a standard Sudoku into the X Sudoku solver by accident, because some classic puzzles are not valid diagonal puzzles.

A solver is most helpful when it supports your reasoning. Use it to verify a finished puzzle, check whether a puzzle is valid, or get one hint when you are completely stuck. If you want the satisfaction of solving, try a fresh diagonal scan before revealing the full answer.

For learning, use the solver after you make a deduction. If your placement matches the solution, your logic was probably sound. If it does not, backtrack and find the first point where a row, column, box, or diagonal rule was missed.

Classic Sudoku Solver vs X Sudoku Solver

Use the classic Sudoku solver when your puzzle only follows row, column, and 3x3 box rules. Use this X Sudoku solver when the puzzle explicitly marks both diagonals or is described as Sudoku X, X Sudoku, or Diagonal Sudoku. The same givens can lead to different results depending on which rule set is active.

If a puzzle fails here but works in a classic solver, it probably was not designed as an X Sudoku. If it works here but has multiple classic solutions, the diagonal rules may be exactly what make it unique. Choosing the right solver prevents false errors and confusing results.