Eight Queens

A queen covers her whole row, her whole column and both diagonals. Place eight of them on a chessboard so that no two can reach each other. The squares already under attack are shaded as you go, which turns guesswork into elimination.

How to play

Because no two queens can share a row, there is exactly one to place on each of the eight rows, which turns the puzzle from a search of the whole board into eight column choices.

  1. Tap a square to place a queen Tap it again to take her off.
  2. Watch the shading Shaded squares are under attack from a queen already on the board.
  3. Place one per row There has to be exactly one in every row and every column.
Full instructions
In depth

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.

Screenshot: How to play Eight Queens
How to play Eight Queens as it appears when the page opens.

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.

Help

How to play Eight Queens

Because no two queens can share a row, there is exactly one to place on each of the eight rows, which turns the puzzle from a search of the whole board into eight column choices. Shading shows every square already covered, so a row with nothing unshaded left in it is the signal to go back and move an earlier queen.

Tap a square to place a queen

Tap it again to take her off.

Watch the shading

Shaded squares are under attack from a queen already on the board.

Place one per row

There has to be exactly one in every row and every column.

Fix the clashes

A queen on a shaded square is highlighted as a clash.

Place them all safely

Inside the move limit.

Runs on your device

The whole game is played inside this page. Nothing is uploaded, there is no account, and your best score is stored in this browser only. Once the page has loaded it works offline.

Good to know

Work down row by row

Place one queen in row one, then find a safe square in row two, and so on. Jumping about the board is how people get stuck.

The diagonals catch everyone

Rows and columns are easy to see. Long diagonals are what most clashes turn out to be, which is why they are shaded.

Avoid the centre early

A queen near the middle attacks far more squares than one near a corner, leaving you less room.

There are 92 solutions

On the standard board, 92 different arrangements work. Any one of them counts, so there is no single answer to find.

Common questions

How does a queen move?
Any distance along its row, its column, or either diagonal.
Is there only one answer?
No — 92 arrangements work on an eight by eight board, and any of them is accepted.
What is the best method?
Place one queen per row, working from the top down, and back up when you get stuck.
Is it free?
Yes — no account, no limit on how many games you play, and no ads inside the game area itself. Ads on the page around it pay for the site.
Does it work on a phone?
Yes. The board scales to your screen and the controls are made big enough to use with a thumb.
Where is my best score kept?
In your browser on this device. It is never sent anywhere and will not follow you to another computer.