Chess rules
How castling works in chess
Castling is the only standard chess move in which two pieces move at once. It is easy to perform, but its legal conditions are precise.
Most chess moves do one job. Castling usually does two: it moves the king away from the exposed center and brings a rook closer to active central files. Learning the rule is essential, but understanding its purpose will also help you decide when castling is a good move rather than an automatic one.
The castling move step by step
To castle, move your king two squares toward one of your rooks. Then move that rook over the king and place it on the square immediately beside the king. Both movements count as a single turn.
For White, kingside castling moves the king from e1 to g1 and the rook from h1 to f1. Queenside castling moves the king from e1 to c1 and the rook from a1 to d1. Black follows the same pattern on rank 8. In algebraic notation, kingside castling is written O-O and queenside castling is written O-O-O. Those characters are capital letter O's, not zeroes.
All conditions for legal castling
You may castle only when every relevant condition is satisfied:
- The king has not moved earlier in the game.
- The rook used for castling has not moved earlier in the game.
- No pieces stand between that king and rook.
- The king is not currently in check.
- The king does not cross a square attacked by an enemy piece.
- The king does not finish on an attacked square.
The first two conditions remain important even if a piece moved away and returned to its original square. A king that moved from e1 to e2 and back to e1 has permanently lost the right to castle. The same applies to a rook that leaves and returns. If one rook moves, castling may still remain possible with the other rook, provided all other conditions are met.
What may be attacked?
The safety restrictions apply to the king, not the rook. The rook may be under attack before castling. On queenside castling, the b-file square between king and rook must be empty, but that square may be attacked because the king never crosses it. What matters is the king's starting square, transit square, and destination square.
You also cannot escape an existing check by castling. First answer the check with another legal move. If your king has not moved, castling may become available on a later turn after the threat is gone.
Common castling mistakes
Beginners sometimes think that a checked rook prevents castling, or that the queen must move before kingside castling. Neither is true. Only the pieces physically between king and chosen rook must move away. On the kingside those are normally the bishop and knight; on the queenside they are the queen, bishop, and knight.
Another error is testing only attacks from nearby pieces. A distant bishop, rook, or queen can attack a square along an open line. A pawn also attacks diagonally even when that attacked square is empty, so an enemy pawn can make the king's route unsafe.
When should you castle?
In many openings, early castling is sensible because the center can open quickly. A castled king usually has a pawn shield, while the rook becomes easier to connect with the other rook. Delaying without a reason may leave your king vulnerable to a central attack.
Castling is not always best, however. If the side of the board where you plan to castle has a damaged pawn structure or an incoming attack, moving there may increase danger. In simplified endgames, the king often belongs in the center, and spending a move on castling may not help. Evaluate the position rather than following a fixed move count.
When players castle on opposite sides, attacks often become sharper because each player can push pawns toward the opposing king without exposing their own pawn shield. When both castle on the same side, play is often more restrained around those kings.
Practice the rule
Before castling, ask three questions: have the king or rook moved, is the path empty, and is every king square safe? That short checklist prevents nearly every rules mistake. For the rest of the game's foundations, visit the complete chess rules. If unusual pawn captures are your next topic, read en passant explained.