Castling is the only move in chess that lets you move the king and a rook at the same time. It tucks the king into a safe spot at the edge of the board and brings the rook toward the center, so it is often used in the opening.
How It Moves
Move the king two squares toward the rook, and move the rook to the square just on the other side of the king.
- Kingside castling: The king goes from e1 to g1 and the rook from h1 to f1. In game records it is written O-O, and it is also called “short castling.”
- Queenside castling: The king goes from e1 to c1 and the rook from a1 to d1. In game records it is written O-O-O, and it is also called “long castling.”
Black does the same: the king goes from e8 to g8 or c8.
The diagram above shows White castling kingside in the opening. The king has moved to g1 and the rook to f1.
When You Can Castle
You can castle only when all of these conditions are met.
- The king has never moved.
- That rook has never moved.
- There are no pieces between the king and the rook.
- The king is not in check.
- The squares the king passes over and lands on are not attacked by an enemy piece.
A king that has moved can never castle again, even if it comes back to its original square. The same goes for rooks: if the kingside rook has moved, only kingside castling is lost (queenside is still possible).
Examples of When You Can’t
A piece is in the way
For queenside castling, b1 must also be empty, even though the king doesn’t pass over it.
The king is in check
You can’t castle to get out of check. First deal with the check some other way. After the check is gone, if the king and rook haven’t moved, you can castle later.
A square on the way is attacked
Black’s bishop is eyeing f1, so the king can’t pass over f1, and kingside castling is not possible. Queenside castling is allowed.
The rook’s square may be attacked
The condition applies only to the king’s path. Even if the rook is attacked, or b1 (which only the rook passes over in queenside castling) is attacked, you can still castle.
Which Side to Choose
- Kingside (O-O): Fewer pieces to move (just the knight and the bishop), so you can do it sooner. The king also ends up closer to the corner.
- Queenside (O-O-O): You need to clear three pieces: the knight, the bishop, and the queen. The advantage is that the rook can go to work right away on the d-file.
When you’re starting out, we recommend castling kingside early to make your king safe.
In the App
In the Chess Board app, select the king and then select the square two squares away (g1 or c1) to castle, and the rook moves automatically. If the conditions aren’t met, that square isn’t shown as a place the king can move. In the move record, it appears as a king move (such as e1g1).
Other special moves are covered in The Rules of Chess.
