Castling in Chess
Castling is a special move in chess that lets you do two important things at once: move your king to safety and activate your rook. It is the only move in chess where two pieces move at the same time.
Types of Castling
Kingside Castling (O-O)
The king moves two squares toward the h-file rook, and the rook jumps over to the other side of the king.
- King: e1 → g1 (White) or e8 → g8 (Black)
- Rook: h1 → f1 (White) or h8 → f8 (Black)
Queenside Castling (O-O-O)
The king moves two squares toward the a-file rook, and the rook jumps to the other side of the king.
- King: e1 → c1 (White) or e8 → c8 (Black)
- Rook: a1 → d1 (White) or a8 → d8 (Black)
Requirements for Castling
All of these conditions must be met to castle:
- The king has not previously moved in the game.
- The rook involved has not previously moved in the game.
- There are no pieces between the king and the rook.
- The king is not currently in check.
- The king does not pass through a square that is attacked by an enemy piece.
- The king does not land on a square that is attacked by an enemy piece.
When to Castle
- Castle early, usually within the first 10 moves. An uncastled king in the center is vulnerable to attacks.
- Kingside castling (O-O) is more common and usually safer because the king is tucked behind more pawns.
- Queenside castling (O-O-O) can be aggressive. The rook immediately lands on the d-file, often an open or semi-open file.
- Don't castle into an attack. If your opponent has aimed pieces at your kingside, consider castling queenside instead.
- Sometimes it's better not to castle at all, for example in endgames where the king should be active in the center.
Castling Notation
In standard algebraic notation, castling uses the letter O (not the number zero):
- O-O = Kingside castling
- O-O-O = Queenside castling
Example game: 1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. O-O (White castles kingside on move four)
Common Mistakes
- Moving the king or rook "just one square" early on. This permanently loses the right to castle on that side.
- Castling into an opponent's pawn storm or piece attack.
- Forgetting that the king cannot castle through check, even if the destination square is safe.
- Delaying castling too long and getting caught in a central attack.
Over-the-Board Etiquette: Touch the King First
In rated tournament play, castling has a physical procedure. You must move the king first (two squares, with one hand), then move the rook with the same hand. If you touch the rook first, the touch-move rule can oblige you to make a rook move instead, and your castling rights on that side are gone with it. Arbiters rule on this regularly; make king-first a habit from your first casual game and it will never cost you.
A related rules corner: castling rights are about the pieces' history, not the position. A rook that returns to its original square after moving does NOT regain the right, and the same is true for the king. Rights, once lost, are lost for the rest of the game.
Castling in Chess960
In Chess960 (Fischer Random), the king and rooks can start on unusual squares, but castling still exists and still ends on the classical squares: king on g1 and rook on f1 for kingside, king on c1 and rook on d1 for queenside. The same six conditions apply. In some positions the king barely moves; in others the rook travels half the board. Try a few starts with the Chess960 position generator and the rule clicks quickly.
Can You Castle If... (The Cases That Confuse Everyone)
The six conditions above settle most questions, but three cases trip up even experienced players, because the rule cares only about the KING's journey, never the rook's:
- Can you castle if the rook is attacked? Yes. Only the king's squares matter. If your h1 rook is hanging to a bishop on the long diagonal, O-O is still perfectly legal.
- Can you castle if the rook passes through an attacked square? Yes, and this comes up constantly in queenside castling. When White plays O-O-O, the king travels e1-d1-c1, but the rook crosses b1. If an enemy piece attacks b1 (but not c1, d1, or e1), castling queenside is still legal. The b1 square is the single most misunderstood square in the castling rule.
- Can you castle out of check? No, never. If your king is in check, you must address the check by other means first. But here is the part beginners miss: being in check earlier in the game does NOT remove castling rights, as long as you dealt with that check without moving your king. Blocked a check with a bishop on move 8? You can still castle on move 12.
One more distinction worth engraving: a king that has moved and returned to e1 can never castle again, but a king that has merely been attacked and defended without moving keeps full rights. Rights are lost by MOVING, not by being threatened.
Kingside or Queenside? A Practical Comparison
Kingside castling (O-O) needs only two pieces developed (knight and bishop), tucks the king behind three untouched pawns, and is playable by move 4 to 6 in most openings. That is why roughly 80 to 90 percent of castled games in master databases castle short. Queenside castling (O-O-O) needs three pieces out of the way (queen, bishop, knight), leaves the a-pawn undefended by the king, and usually requires a move like Kb1 afterward to finish the job, but it pays you back immediately: the rook lands on d1, typically the most valuable central file, with no extra tempo spent.
The practical rule of thumb: castle kingside by default, and castle queenside when you intend to attack on the kingside with your pawns. Opposite-side castling turns the game into a race of pawn storms, where every pawn move in front of the enemy king is an attacking move rather than a weakening one. That is a sharp, double-edged fight; walk into it deliberately, not by accident.
Practice It
Set up the position after 1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 on the board editor and play 4. O-O to see the mechanics. Then read how castling fits into full opening plans in our Italian Game and Ruy Lopez guides, where castling on move four to six is the backbone of the setup.