Castling: the rules for castling kingside and queenside

Castling is the only move where you move two of your own pieces at once: the king goes to safety and the rook comes into play. But it has its conditions, and every one of them must be met.

What is castling?

Castling is a move with the king and one of the rooks at the same time. The king moves two squares toward the rook, and the rook jumps over the king and lands on the square next to it. It counts as a single move, and under the rules it is a king move.

Castling does two things at once: the king gets to safety behind its pawns, and the rook gets out of the corner and into the game.

Castling kingside

Castling kingside, also called short castling, O-O, is done with the rook on the kingside. White's king goes from e1 to g1 and the rook from h1 to f1. Black's king goes from e8 to g8 and the rook from h8 to f8.

abcdefgh87654321
White can castle kingside. The king moves two squares toward the rook, from e1 to g1, and the rook jumps over the king to f1 (the ring).
abcdefgh87654321
After castling kingside, O-O: the king stands on g1 behind its pawns, and the rook on f1 is in the game.

Castling queenside

Castling queenside, or long castling, O-O-O, is done with the rook on the queenside. White's king goes from e1 to c1 and the rook from a1 to d1. Black's king goes to c8 and the rook to d8. The king moves just as far as when castling kingside, two squares, but the rook moves three.

abcdefgh87654321
Castling queenside: the king moves two squares toward the a-rook, from e1 to c1, and the rook jumps over to d1 (the ring). The squares b1, c1 and d1 must be empty.
abcdefgh87654321
After castling queenside, O-O-O: the king on c1, the rook on d1.

When may you castle?

The right to castle is lost for the rest of the game if

  1. the king has already moved, even if it has gone back to its square, or
  2. the rook has already moved. Then only castling on that side is gone.

Castling is prevented for the moment, just on this move, if

  1. there is any piece between the king and the rook, yours or your opponent's,
  2. the king is in check,
  3. the king would have to pass over a square your opponent attacks, or
  4. the king would land on a square your opponent attacks, in other words in check.
abcdefgh87654321
White may not castle kingside: the bishop on c4 attacks f1, the square the king has to pass. Castling queenside, though, is allowed.
abcdefgh87654321
White is in check from the bishop on b4 and may not castle right now. But the right remains: once the check has been met without moving the king, White may castle later.

Good to know: the conditions apply only to the king's squares. The rook may be attacked, and when castling queenside the square b1 (b8 for Black) may be attacked, since only the rook passes over it.

abcdefgh87654321
Castling queenside is allowed here, even though Black attacks both b1 and the rook on a1. Only the king's squares count: e1, d1 and c1.

Try it yourself

abcdefgh87654321
Try it yourself: castle kingside. Move the king two squares, from e1 to g1, and the rook follows.
abcdefgh87654321
Here White may castle to one side only. Which one? Castle that way.

How to castle on the board

Move the king first, two squares, and then the rook, with the same hand. That is how FIDE's rules describe the move. If you deliberately touch the rook first, you may not castle on that side on that move. Then the touch-move rule applies: you must move the rook, if it can move.

Kingside or queenside?

Castling kingside is the most common. It is quicker to prepare, since only the knight and the bishop need to move, and the king stands safely on g1. Castling queenside requires the queen to have moved too, but it puts the rook straight onto the central d-file. The king on c1 is a little more exposed, and it often takes an extra step to b1. When the players have castled on opposite sides, the game often gets sharp: both push their pawns toward the other king.

A good rule of thumb for beginners is to castle early, once the knight and the bishop have left the back rank. Read more about development and about how castling fits into different openings.

Did you know?

  • Castling is the only move where you move two of your own pieces at once.
  • It is also the only time the king moves two squares, and the only time a rook jumps over another piece.
  • In notation castling is written with the letter O: O-O and O-O-O. Some books use zeros instead, 0-0 and 0-0-0.

Frequently asked questions

When can't you castle?

When the king or that rook has already moved, when there is a piece between them, when the king is in check, or when the king would pass over or land on a square the opponent attacks.

Can you castle if the rook is attacked?

Yes. The conditions apply only to the king's squares. The rook may be attacked, and when castling queenside the square b1 (b8 for Black) may be attacked too.

Can you castle after being in check?

Yes, as long as the king hasn't moved. If you got out of the check some other way, for example by putting a piece in between, you still have the right to castle.

How is castling written?

Castling kingside is written O-O and castling queenside O-O-O. Some books use zeros instead: 0-0 and 0-0-0.

Which piece should you move first?

The king. Under FIDE's rules, castling counts as a king move. If you deliberately touch the rook first, you may not castle on that side on that move.

Updated October 28, 2026