Castling in chess: the rules and when to do it

Updated 17 November 2026 · 2 min read

Quick answer

Castling is a special move where the king moves two squares toward a rook, and that rook jumps over to the square on the king’s other side. You can castle only if the king and that rook have not 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 in check.

Kingside castling (O-O)

The king moves two squares toward the h-file rook, and the rook lands next to it. For White: king e1→g1, rook h1→f1. Kingside castling is written O-O.

White castles kingside: the king goes to g1 and the rook to f1.

Queenside castling (O-O-O)

The king moves two squares toward the a-file rook. For White: king e1→c1, rook a1→d1. It is written O-O-O. It takes longer to prepare because three squares must be empty (b1, c1 and d1).

White castles queenside: the king goes to c1 and the rook to d1.

When can’t you castle?

The rook is allowed to be attacked, and in queenside castling the b1 (or b8) square may be attacked. Only the king’s path has to be safe.

Why castle?

Castling does two jobs in one move: it tucks the king behind a wall of pawns, away from the open centre, and it brings a rook toward the middle where it can join the game. Most strong players castle in the first 10 moves.

🧒 For kids: On a phone or computer, castle by moving your king two squares toward the rook. The rook hops over by itself!
🎯 Getting better: After castling, try not to push the pawns in front of your king. Each pawn move opens a door for enemy pieces.

Try it on a real board: play Knight Bot and get feedback on every move.

Play free ▶

Frequently asked questions

Can you castle if you were in check earlier?

Yes. Being in check earlier doesn’t matter, as long as the king never moved and is not in check right now.

Can you castle if the rook is attacked?

Yes. Only the king can’t start in, pass through or land on an attacked square.

Which is better, kingside or queenside castling?

Kingside is quicker and the most common. Queenside puts the rook straight on the d-file but leaves the a-pawn less protected.

Can you castle with a rook that was promoted?

No. Castling is only allowed with the original rook that has never moved.