How to Castle in Chess
Castling is the only move that shifts two pieces at once, and the only time a king travels two squares. Here is exactly how it works on both sides of the board, and the five conditions that have to hold.

Castling is the one move in chess that breaks two rules at the same time: it moves two pieces in a single turn, and it lets the king travel two squares instead of one. New players often assume they have misunderstood something. They haven't — it really is that strange, and it exists for a practical reason.
In one sentence. The king moves two squares towards a rook, and that rook hops over the king to land on the square the king crossed.
Castling kingside (O-O)
Kingside castling is the common one, and it is the one you will play in the large majority of your games. The king travels from e1 to g1, and the h1 rook lands on f1.
Notice what this achieves in one move. The king has left the centre, where files tend to open and attacks land, and tucked itself behind an untouched wall of pawns. Meanwhile the rook, which started buried in the corner doing nothing, is now on f1 pointing down a half-open file towards the centre. Two problems solved in one turn.
Castling queenside (O-O-O)
Queenside castling is less common because it requires clearing three squares instead of two — the queen has to move as well as the knight and bishop. The king travels from e1 to c1, and the a1 rook lands on d1.
The rook travels further here — three squares rather than two — which is where the longer notation comes from. Queenside castling puts the rook straight onto the central d-file, which is often exactly where you want it, but it leaves the king slightly more exposed on c1 with the a-pawn unguarded. Many players later play Kb1 to tuck the king away properly.
The five conditions
Castling is legal only when all five of the following hold. They are worth learning as a checklist because a surprising number of casual games contain an illegal castle that nobody noticed.
- Your king has never moved. Not "is back on its starting square" — never moved at all. If it stepped away and returned, castling rights are gone permanently.
- That particular rook has never moved. Moving your h1 rook forfeits kingside castling but leaves queenside castling available, and vice versa.
- The squares between king and rook are empty. Two squares for kingside, three for queenside.
- Your king is not currently in check. You may not castle out of check.
- The king does not pass through or land on an attacked square. Every square the king touches on its journey must be safe.
Three things about that last rule
The "attacked squares" condition causes more confusion than the rest combined, so it's worth being precise.
The rook may pass through an attacked square. Only the king's path matters. This comes up specifically in queenside castling: if b1 is attacked, you can still castle, because the king travels e1–d1–c1 and never touches b1. The rook passes over b1, and the rook's safety is irrelevant.
An attacked square is not the same as an occupied square. The squares between king and rook must be empty; the squares the king crosses must be unattacked. Those are two separate conditions that happen to overlap.
Losing the right is permanent. There is no way to restore castling rights once the king or rook has moved, even if both return to their original squares. This is why strong players are reluctant to move the king early without a concrete reason.
Which side should you castle?
Kingside, in most games, and for a simple reason: it is faster. You need to move only two pieces to clear the path, so you can typically castle by move six or seven. Queenside requires moving three, which usually means castling around move eight to ten — and a lot can happen in three moves.
Queenside castling becomes attractive when you and your opponent castle on opposite sides. Then both players can throw pawns at the enemy king without exposing their own, which produces the sharp, racing positions that some openings are famous for. It is a deliberate choice for a sharp game, not a default.
The general advice for anyone below roughly 1500 rating is to castle kingside, castle early, and stop worrying about it. Our article on common beginner mistakes lists failing to castle as one of the most reliable ways to lose games you should have drawn.
How to castle on a physical board without an argument
Under tournament touch-move rules, the piece you touch first is the piece you have committed to move. If you touch the rook first, a strict opponent can insist you have played a rook move — and rook moves are not castling.
So: touch the king first, move it two squares, then move the rook. Better still, move the king two squares with one hand and then the rook with the same hand. Using two hands simultaneously is technically an irregularity in tournament play, even though everyone does it at home.
Where castling comes from
Castling is a relatively late addition to chess. Early European forms had a "king's leap" that allowed the king a single two-square jump, and over several centuries this merged with the rook move into the single move we now play. It was standardised in roughly its modern form by the seventeenth century. The purpose was straightforward: as the queen and bishop became far more powerful pieces in the late medieval reforms, games got sharper, and a king sitting in the centre became a liability. Castling was the rule change that kept games playable.
Common questions about castling
If reading this has left you wanting a game, try our online chess board — it opens straight into a board with no account needed.