How to Castle in Chess: Kingside, Queenside, and Restrictions

Learn the exact castling moves for White and Black, the conditions that make castling legal, and common mistakes about attacked squares.

To castle in standard chess, move your king two squares toward a rook, then move that rook to the square the king crossed. Both movements form one turn. Castling is legal only if neither piece has moved, the squares between them are empty, and the king is not in check and does not cross or finish on an attacked square.

Castling can improve king safety and connect your rooks, but it is not automatically the best move. The final position still needs to be checked for threats.

Know the destination squares

| Side | King moves | Rook moves | Notation | | --- | --- | --- | --- | | White kingside | e1 to g1 | h1 to f1 | O-O | | White queenside | e1 to c1 | a1 to d1 | O-O-O | | Black kingside | e8 to g8 | h8 to f8 | O-O | | Black queenside | e8 to c8 | a8 to d8 | O-O-O |

The king always travels two squares. On the queenside, the rook travels farther because it begins on the a-file. The notation uses the letter O, as explained in the chess notation guide.

For a physical game, move the king first and then the rook with the same hand. On a digital board, use its castling interaction; in this site's standard analysis board, make the legal king move two squares toward the rook.

Check all the conditions

  1. Your king has never moved.
  2. The rook used for castling has never moved.
  3. No piece stands between that king and rook.
  4. Your king is not currently in check.
  5. The king's crossing square and destination square are not attacked.

Moving a king or rook back to its starting square does not restore the right to castle. Moving one rook only removes castling with that rook; the other side can remain available if the king and other rook satisfy the rules.

Kingside castling requires f1 and g1 to be empty for White, or f8 and g8 for Black. Queenside requires b1, c1, and d1 to be empty for White, or b8, c8, and d8 for Black.

Separate rook attacks from king attacks

The rook may be under attack when you castle. The square the rook crosses may also be attacked if the king does not use it. For White's queenside castling, an attack on b1 alone does not prevent castling; attacks on e1, d1, or c1 do.

An opposing piece can count as attacking a square even when moving it would expose its own king. Do not assume that a pinned piece makes the king's route safe. Article 3.8 of the FIDE Laws of Chess gives the full standard castling rule.

Both sides castle kingside in this study sequence:

Loading chessboard…

Start

White first moves the knight from g1 and bishop from f1. Black moves the bishop from f8 and knight from g8 before castling. Those moves clear the relevant routes without moving either king or kingside rook.

Replay the line on the analysis board, watching the king and rook destinations. Then compare it with a position where the king is in check: clearing the path alone is insufficient.

Troubleshoot a rejected castle

Check whose turn it is, the move history, intervening pieces, and attacked squares. If you loaded a custom FEN, also inspect its castling-rights field. A king and rook sitting on their original squares do not prove they are eligible.

Use the board editor to inspect a study position, and review FEN position information. These standard-chess destination rules should not be applied unchanged to Chess960, which has different starting arrangements and castling procedures.

Ready to find your next move?

Set up the position and let Stockfish show you what it sees.

Try the move finder →