EnglishEspañolPortuguêsFrançaisDeutschРусскийBahasa IndonesiaTiếng ViệtTürkçeالعربية

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.

King and a rook standing close together in sharp focus at the edge of a dark board, gold rim light along

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.

♜♝♛♚♞♜♟♟♟♟♟♟♟♞♝♟♗♙♘♙♙♙♙♙♙♙♖♘♗♕♔♖abcdefgh87654321
Before: king on e1, rook on h1, and f1 and g1 are empty.
♜♝♛♚♞♜♟♟♟♟♟♟♟♞♝♟♗♙♘♙♙♙♙♙♙♙♖♘♗♕♖♔abcdefgh87654321
After O-O: the king sits on g1 and the rook has jumped to 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.

♜♚♝♞♜♟♟♟♛♟♟♟♟♞♟♝♙♗♘♙♙♙♕♙♙♙♙♖♔♗♘♖abcdefgh87654321
Before: b1, c1 and d1 have all been cleared.
♜♚♝♞♜♟♟♟♛♟♟♟♟♞♟♝♙♗♘♙♙♙♕♙♙♙♙♔♖♗♘♖abcdefgh87654321
After O-O-O: the king is on c1 and the rook has landed 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.

  1. 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.
  2. That particular rook has never moved. Moving your h1 rook forfeits kingside castling but leaves queenside castling available, and vice versa.
  3. The squares between king and rook are empty. Two squares for kingside, three for queenside.
  4. Your king is not currently in check. You may not castle out of check.
  5. 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

What is castling in chess?
Castling is the only move in chess that moves two pieces at once. The king moves two squares towards a rook, and that rook jumps over the king to the square immediately on the other side. It is the standard way to move the king to safety and bring a rook into play in a single move.
How do you castle in chess?
Move your king two squares towards the rook you want to castle with, then place that rook on the square the king passed over. On a physical board, always touch the king first — touching the rook first can be interpreted as a rook move under touch-move rules.
When can you not castle?
You cannot castle if the king or that rook has already moved, if any piece stands between them, if the king is currently in check, if the king would pass through a square attacked by an enemy piece, or if the king would land on an attacked square. Note that the rook is allowed to pass through an attacked square, and for queenside castling the b1 or b8 square may be attacked without preventing the move.
Can you castle out of check?
No. If your king is in check you must deal with the check some other way — by moving the king, capturing the checking piece, or blocking the line. You can, however, castle later in the game once the check has been resolved, provided the king itself never moved.
What is the difference between O-O and O-O-O?
O-O is kingside castling, sometimes called short castling, where the king goes to g1 or g8. O-O-O is queenside castling, or long castling, where the king goes to c1 or c8. The extra O reflects the greater distance the rook travels.

If reading this has left you wanting a game, try our online chess board — it opens straight into a board with no account needed.