How to solve the Eight Queens puzzle
The Eight Queens puzzle asks you to place eight queens on a standard chessboard so that no two queens attack each other. A queen attacks along its row, its column, and both diagonals, so a valid solution has exactly one queen in every row, one in every column, and no two sharing a diagonal. The puzzle has been around since the 1840s and remains one of the most satisfying logic challenges you can finish in a few minutes. This guide covers the full rules, the controls on the page, and the thinking that leads to a clean solution without guessing.

Rules and objective
A queen in chess can move any number of squares along its row, its column, or either of its two diagonals. In this puzzle that means no two queens may share a row, a column, or a diagonal of any length. Since the board has eight rows and you need eight queens, there must be exactly one queen in every row and exactly one in every column.
You win by placing all eight queens so that none of them can reach any other, and you must do it within the move limit. Every tap counts as a move, whether you are placing a queen or picking one back up. There are 92 distinct arrangements that work on the eight by eight board, and the puzzle accepts any of them. It checks the final position rather than comparing against a stored answer, so there is no single solution you have to find.
Controls on the page
Tap any square on the board to place a queen there. Tap a square that already holds a queen to remove her. Squares currently under attack by at least one queen are shaded, so you can see at a glance which squares are still safe. A queen placed on a shaded square is highlighted as a clash, which means it is attacking or being attacked by another queen already on the board.
The stats bar shows the number of queens placed out of the target, the number of safe squares remaining, and how many moves you have left. The Clear board button removes all queens at once without counting as moves. The Level selector offers three board sizes. Easy uses a six by six board, Normal uses the classic eight by eight, and Hard raises it to ten by ten. Press New game to start fresh at the selected size.
The row-by-row method
The most reliable approach is to work down the board one row at a time. Place a queen on a safe square in row one. Move to row two and find a safe square there. Continue downward. If you reach a row where every square is shaded, go back up and move the most recent queen to a different position. This is essentially the same algorithm a computer would use, called backtracking, but the board is small enough that a human can do it by hand.
Working row by row has two advantages. First, it guarantees that no two queens share a row, because you only ever place one per row. Second, it limits the number of things you need to check. When you are filling row five, you only have four queens on the board, so the number of attacked squares is still manageable. Jumping around the board and placing queens in random rows makes it much harder to keep track of the diagonals.
Why the diagonals are the hard part
Rows and columns take care of themselves if you place one queen per row and aim for distinct columns. The real difficulty is the diagonals. A queen on row three, column two attacks a long diagonal running from the top left corner to the bottom right. Another queen on row six, column five sits on that same diagonal, and beginners often miss this because the two squares look far apart.
The shading on the board is designed to help with exactly this problem. Every time you place a queen, the diagonals it controls light up instantly. Use the shading rather than trying to trace diagonals by eye. If a square looks safe but the shading says otherwise, the shading is right. Trust it and look elsewhere.
Starting positions that help
Avoid placing your first queen near the centre of the board. A queen in the middle of the first row attacks far more squares than one near a corner, because its diagonals stretch further across the board. Starting on column one or column two leaves the rest of the board more open.
On the eight by eight board, try placing the first queen on column two and the second on column four. That leaves the long diagonals mostly clear and gives you room to place queens on both sides. Many of the 92 known solutions begin with this kind of offset pattern. There is no single magic start, but keeping the first few queens toward the edges is a good habit that reduces the chance of getting stuck halfway through.
The move limit and why it matters
The move limit is set at five times the board size, so on the eight by eight board you get forty moves. Every placement and every removal counts. This means careless experimentation will eat through your budget quickly. If you place a queen, realise it clashes, remove it, and try another square, that costs three moves for one queen.
The way to stay under the limit is to look before you tap. Check the shading, confirm the square is safe on all four lines of attack, and then place the queen. If you are following the row-by-row method and only backtrack when truly stuck, you will usually finish in fifteen to twenty moves on the eight by eight board, well within the limit.
Common mistakes beginners make
The most common mistake is jumping around the board. Players place a queen in row one, then one in row seven, then one in row three, and quickly lose track of which diagonals are occupied. Working systematically from top to bottom avoids this entirely.
Another frequent error is placing too many queens near the centre. A queen on the fourth column of the fourth row covers nearly every diagonal on the board. Even if the placement is valid now, it leaves almost no room for the queens that follow. Edge and corner-adjacent squares are less greedy with diagonal coverage.
Beginners also tend to ignore the clear board button. If you are twelve moves in and three queens are clashing, it is often faster to wipe the board and start fresh with what you have learned than to untangle the mess one move at a time. Clearing does not count against your move limit, so there is no penalty for starting over when the position has become unworkable.
Difficulty levels explained
The Easy level uses a six by six board with six queens. There are fewer solutions than on the eight by eight, but the smaller board makes each one easier to find because diagonals are shorter and the shading covers fewer squares. This level is a good place to practise the row-by-row method without pressure.
Normal is the classic eight by eight problem with eight queens and 92 solutions. This is the version most people mean when they talk about the puzzle, and it is the one worth mastering. Hard uses a ten by ten board with ten queens. The number of solutions rises sharply with board size, but the larger board also means more squares to check on every move and longer diagonals that are harder to trace by eye. The move limit scales with the board size, giving you fifty moves on the ten by ten, so you still have room to work. Even so, you need to be more deliberate with each placement because the consequences of a mistake reach further across the grid.
Privacy and how the game runs
The whole game runs inside your browser. Nothing is uploaded, there is no account, and your best score is stored in local storage on this device only. It will not follow you to another computer or another browser on the same machine. Once the page has loaded it works fully offline, so you can solve puzzles on a train or a plane without needing a connection.
