How Does Castling Work in Chess?
Castling is the only move in chess where two pieces move at once. It is essential for king safety and rook activation, but the rules can be tricky. Here is the complete guide.
How castling works
Castling involves moving the king two squares toward a rook, then the rook jumps over the king to the square the king crossed. There are two types:
- Kingside castling (O-O): The king moves two squares toward the h-rook. The rook moves to the square the king crossed (f1/f8).
- Queenside castling (O-O-O): The king moves two squares toward the a-rook. The rook moves to the square the king crossed (d1/d8).
When you cannot castle
You cannot castle if any of these conditions are true:
- The king has previously moved (even if it moved back).
- The rook you want to castle with has previously moved.
- The king is currently in check.
- The king would pass through a square that is attacked by an enemy piece.
- The king would land on a square that is attacked (ending in check).
- There are pieces between the king and the rook.
Important: the rook CAN pass through an attacked square during queenside castling. Only the king's path matters. See can you castle out of check?
Strategic advice
Castle early in the game to protect your king. In most openings, castling by move 5-8 is ideal. Kingside castling is more common because it requires moving fewer pieces out of the way. Queenside castling can be aggressive because it leaves the rook on an open or semi-open d-file.
See our guides on delayed castling and opposite-side castling attacks.