Castling in Chess: Kingside and Queenside Castling
Castling is one of the most important moves in chess, and yet one of the most misunderstood by beginners. This unique move lets you put your king safely away while bringing your rook into play in a single move. Mastering castling — its conditions, its two forms and its exceptions — is essential if you want to improve at chess.
What Is Castling?
Castling is the only move in chess in which two pieces move at the same time: the king and one of the two rooks of the same colour. The king moves two squares towards the chosen rook, and the rook jumps over to the other side of the king, landing on the square the king has just crossed.
This move serves a twofold strategic purpose: to get the king to safety behind a wall of pawns, and to activate the rook by bringing it closer to the centre of the board. Grandmasters agree that castling early in the game is almost always a good decision.
To castle, you move the king first (not the rook). If you touch the rook first, you must move the rook only — castling is then no longer possible on that move.
Kingside vs Queenside Castling
There are two kinds of castling, depending on which rook is involved. Here is how they compare:
| Feature | Kingside castling (short) | Queenside castling (long) |
|---|---|---|
| Rook used | The h-file rook | The a-file rook |
| Notation | O-O | O-O-O |
| Squares that must be empty | f1, g1 (or f8, g8 for Black) | b1, c1, d1 (or b8, c8, d8 for Black) |
| King's final square (White) | g1 | c1 |
| Rook's final square (White) | f1 | d1 |
| King safety | Generally safer | King more exposed, counterplay from the opponent is common |
| Frequency in tournaments | Very common | Rarer, often seen in asymmetrical positions |
The Conditions for Castling
Castling is not always possible. Five conditions must all be met at the same time for it to be legal:
- Neither the king nor the rook involved has moved yet since the start of the game. As soon as either of these pieces makes a move — even if it later returns to its starting square — the right to castle with it is lost for good.
- All the squares between the king and the rook must be empty. For White's kingside castling, f1 and g1 must be free. For queenside castling, b1, c1 and d1 must be unoccupied.
- The king must not be in check when castling is played. You cannot “castle out of check”. You must first deal with the check in another way, and the right to castle is lost only if you had to move the king (or the rook involved) to do so.
- The king must not pass through any attacked square. When castling, the king crosses an intermediate square. If that square is controlled by an enemy piece, castling is illegal — even if the final square is safe.
- The king's destination square must not be attacked. The king cannot end up in check after castling. Its destination square must be safe.
Notation
In algebraic notation, castling is written by convention, regardless of the player's colour or the side chosen:
Kingside castling: O-O
Queenside castling: O-O-O
Here is a typical opening in which White castles kingside on the 5th move: 1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 O-O (both sides have castled kingside — the classic Ruy Lopez).
Note: castling is also written 0-0 with zeros (the form used in the FIDE Laws of Chess, Appendix C) rather than capital “O”s (the form used in PGN format). Both notations are accepted.
Common Mistakes
Beginners who wait until all their pieces are “in the right place” before castling often leave their king vulnerable in the centre for too long. As a general rule, aim to castle within the first 10 moves.
After castling, many beginners push the pawns in front of their king (g4, h4…) to attack. This weakens the pawn shield and exposes the king to attack. Only move these pawns if you have a specific tactical reason.
Some beginners don't like castling because “the rook ends up far away”. That is a misjudgement: king safety almost always takes priority over the rook's position early in the game. An uncastled king is a weakness that experienced players will exploit systematically.
If you have moved your king, even for one square and then brought it back, castling is no longer possible for the rest of the game. Online chess software will flag it as an illegal move.
Castling is only one of the special moves in chess. To learn about en passant capture and pawn promotion as well, see Le Palais des Échecs' complete guide to all the special moves in chess.
Take Your Game Further
Once you have mastered castling, find out how to finish a game with a win or how to avoid stalemate.
Checkmate All the Rules