Chess rules

Castling in Chess: The Rules and When You Can't

Castling is a single move in which the king moves two squares toward one of its rooks and that rook jumps to the square the king crossed. It is the only move where two of your pieces move at once, and it is used to tuck the king away and develop the rook.

Examples

1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. O-O

With the knight and bishop gone from f1 and g1, White castles kingside. The king goes from e1 to g1 and the rook from h1 to f1.

1. O-O-O

The bishop on e4 attacks b1, but White may still castle queenside. Only the king's squares e1, d1, and c1 must be safe. The rook may pass over an attacked square.

How to castle

Kingside castling moves the king from e1 to g1 and the rook from h1 to f1 (e8 to g8 and h8 to f8 for Black). Queenside castling moves the king from e1 to c1 and the rook from a1 to d1 (e8 to c8 and a8 to d8 for Black). The king always moves exactly two squares.

Over the board, move the king first and then the rook, using one hand. Under the FIDE Laws, if you touch the rook first you may not castle with it on that move.

When castling is not allowed

You lose the right to castle for the rest of the game if your king has moved, even if it later returns to its starting square. You lose the right to castle on one side if that rook has moved.

Castling is also illegal for the moment, though it may become legal later, in these cases: there is any piece between the king and the rook, your king is in check, the king would pass through a square attacked by an enemy piece, or the king would land on an attacked square.

Common misunderstandings

Having been in check earlier does not take away the right to castle. Only moving the king does. The rook may be attacked, and on the queenside the rook may pass over an attacked square on b1 or b8, because only the king's path is checked.

You can castle on one side even after the other rook has moved. Castling is also legal when the rook gives check after it lands.

Common questions

Can you castle out of check?

No. You cannot castle while your king is in check. You may castle later if the king has not moved.

Can you castle if the rook is attacked?

Yes. Only the king's starting square, the square it crosses, and the square it lands on must be free of attack.

Find these moments in your own games.

Paste a game into the free analyzer to find the moves that cost you, with each mistake explained in plain English. Three analyses are free, with no email or card.

Analyze a game free →

Practice with a coach beside you.

Play a human-like opponent at your level while the coach explains your moves as you go. The first coached game is free.

Play a free coached game →