Castling is the only move in chess where two pieces move at once, and the only time the king travels two squares. It tucks your king away behind a wall of pawns and brings a rook toward the center, all in a single turn. Most games include it, so it pays to know the rules exactly.
Quick answer
To castle, move your king two squares toward a rook, then place that rook on the square the king just crossed. You can castle only if neither the king nor that rook has moved, the squares between them are empty, and the king is not in check, does not pass through an attacked square and does not land on one. Kingside castling is written O-O and queenside castling O-O-O.
- Pieces that move
- The king and one rook
- King moves
- Two squares toward the rook
- Notation
- O-O (kingside), O-O-O (queenside)
- Counts as
- One move, and a king move
How to castle
Castling is a king move. Pick up the king first and move it two squares toward the rook you want to castle with. Then lift that rook over the king and put it on the square right next to it, on the other side.
- Kingside castling (short castling). White's king goes from e1 to g1 and the rook from h1 to f1. For Black, the king goes from e8 to g8 and the rook from h8 to f8.
- Queenside castling (long castling). White's king goes from e1 to c1 and the rook from a1 to d1. For Black, the king goes to c8 and the rook to d8.
Try both on the board. Tap the king, then tap the square two steps to the left or right.
The rules of castling
You may castle only when all of these are true:
- The king has not moved earlier in the game. Once it has moved, even if it comes back to its starting square, you can never castle.
- The rook you are castling with has not moved. If one rook has moved, you can still castle with the other one.
- Every square between the king and that rook is empty.
- The king is not in check. You can't castle to get out of check.
- The king does not pass through a square that is attacked by an enemy piece.
- The king does not land on an attacked square. No move may ever put your own king in check.
Each side can castle only once in a game.
When you can't castle: an example
On this board the black bishop on a6 attacks the square f1. White's king would have to cross f1 to castle kingside, so short castling is not allowed.
Queenside castling is fine. The king only crosses d1 and lands on c1, and neither square is attacked.
Notice that the restriction is temporary. If the bishop is blocked, captured or moves away, White can castle kingside again, as long as the king and rook still haven't moved.
Things that do not stop you from castling
- The rook is attacked. Only the king's squares matter. You can castle with a rook that is under attack.
- The rook passes over an attacked square. In queenside castling the rook crosses b1 (or b8). That square may be attacked, because the king never touches it.
- You were in check earlier. If you answered the check without moving your king, by blocking or capturing, you keep the right to castle.
- Your opponent has already castled. Each side castles independently.
Kingside or queenside?
| Kingside (O-O) | Queenside (O-O-O) | |
|---|---|---|
| King ends on | g1 or g8 | c1 or c8 |
| Rook ends on | f1 or f8 | d1 or d8 |
| Pieces to clear first | Two (knight and bishop) | Three (knight, bishop and queen) |
| King safety | Very safe, close to the corner | A little more open; the a-pawn is unprotected |
| Rook activity | Rook comes to f1 | Rook lands on the central d-file at once |
Kingside castling is far more common, because it is quicker to prepare and the king ends up safer. Castle queenside when your queenside pieces are already out and you want your rook on the d-file, or when you plan to attack on the kingside with your pawns. If the two players castle on opposite sides, both usually push their pawns at the enemy king, and the game becomes a race.
When should you castle?
- Early. In most openings you should castle within the first ten moves, before the center opens.
- Before you attack. A king in the middle makes every tactic work for your opponent.
- Not on autopilot. If the side you are castling toward has missing or advanced pawns, or your opponent's pieces are already aimed there, look at the other side first.
- In the endgame, maybe not at all. With the queens off the board the king is often better in the center.
The name of this site comes from this piece of advice. In the Italian Game, for example, White can castle on move four.
How castling is written
Kingside castling is written O-O and queenside castling O-O-O. Game files in PGN format use the capital letter O. The official FIDE handbook prints the digit zero, as 0-0 and 0-0-0, and you will see both. If castling gives check, a plus sign is added, as in O-O+.
Over the board, the touch-move rule applies: touch the king first and castle with one hand. If you touch the rook first, you can be made to move the rook only. More on writing moves in chess notation.
Where castling comes from
Castling is one of the newer rules of chess. It took its modern form in Europe during the 16th and 17th centuries, when the queen and bishop had become much more powerful and kings needed a faster way to reach safety. Together with en passant and pawn promotion, it is one of the three special moves.
Frequently asked questions
Can you castle out of check?
No. If your king is in check, you must deal with the check first. You may castle on a later move if the king has not moved.
Can you castle through check?
No. The king can't pass over a square that an enemy piece attacks, and it can't land on one.
Can you castle if your rook is under attack?
Yes. An attacked rook does not stop castling, and the rook may also pass over an attacked square. Only the king's squares matter.
Can you castle after moving your king?
No. Once the king has moved, you lose the right to castle for the rest of the game, even if the king returns to its original square.
Can you castle after being in check?
Yes, as long as you got out of check without moving the king and the other conditions are met.
What does O-O mean in chess?
O-O means kingside castling. O-O-O means queenside castling. Some sources write them with zeros, as 0-0 and 0-0-0.
Is castling a king move or a rook move?
It is a king move. Under the touch-move rule you must touch the king first.
Can both players castle?
Yes. Each player may castle once per game, on either side, when the rules allow it.