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.
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.
When may you castle?
The right to castle is lost for the rest of the game if
- the king has already moved, even if it has gone back to its square, or
- the rook has already moved. Then only castling on that side is gone.
Castling is prevented for the moment, just on this move, if
- there is any piece between the king and the rook, yours or your opponent's,
- the king is in check,
- the king would have to pass over a square your opponent attacks, or
- the king would land on a square your opponent attacks, in other words in check.
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.
Try it yourself
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