How to Castle in Chess: Rules, Kingside vs Queenside, and When You Can't

How castling works in chess step by step: kingside and queenside castling, the five rules that decide when you can castle, castling out of check, and why you should castle early. Free interactive lesson.

Castling is the only move in chess where two pieces move at once: the king and a rook. It does two important jobs in a single move: it puts your king in a safe corner and brings a rook toward the center. Most strong players castle in almost every game.

How to castle

The king moves two squares toward one of its rooks, and that rook jumps over to the square on the king's other side.

  • Kingside castling (short castling, written O-O): the white king goes from e1 to g1 and the rook from h1 to f1. For Black: king e8 to g8, rook h8 to f8.
  • Queenside castling (long castling, written O-O-O): the white king goes from e1 to c1 and the rook from a1 to d1. For Black: king e8 to c8, rook a8 to d8.
White has castled kingside: king on g1, rook on f1
White has castled kingside: king on g1, rook on f1

Try castling in the interactive lesson

When you can castle: the 5 rules

You may castle only if all of these are true:

  1. The king has never moved in this game.
  2. That rook has never moved in this game.
  3. Every square between the king and the rook is empty.
  4. Your king is not in check right now.
  5. The king does not pass through, or land on, a square attacked by an enemy piece.

If the king has moved and come back, you can't castle at all in that game. If only one rook has moved, you can still castle on the other side.

Kingside or queenside?

  • Kingside castling is faster (only the knight and bishop need to move out of the way) and the king ends up very safe. It's the usual choice for beginners.
  • Queenside castling needs the queen, bishop and knight out of the way. The king is a little less sheltered (a2 is exposed), but the rook lands on d1, right in the center. It often goes with an attack on the opposite wing.

Why you should castle early

The king in the center becomes a target as soon as the position opens. Castling in the first 10 moves is one of the most reliable habits a beginner can build, see our 10 golden rules of the opening.

FAQ

Can you castle out of check?

No. If your king is in check, you must escape the check another way. You can castle later, once the check is gone, if the king and rook still haven't moved.

Can you castle through check?

No. The king may not pass through a square attacked by an enemy piece, and it may not land on one either.

Can you castle if the rook is attacked?

Yes. Only the king must not be in check, pass through check or land in check.

Can you castle after moving your king back to its square?

No. Once the king has moved at all, castling is gone for the rest of the game.

Is castling a king move or a rook move?

It's a king move. You touch the king first and move it two squares; the rook follows.

Chess rules and basics