How to Castle in Chess: Kingside and Queenside Rules
Learn how to castle in chess for White and Black, where the king and rook go, and how to check blocked squares, lost rights and check.
- Chess Rules
- King Safety
- Game Review
On this page
The rules for castling are straightforward, but the conditions required before it can be done are quite involved. Here’s how you know whether or not a player is allowed to castle.
Castling is one of the most important moves in chess because it combines king safety with rook activity. When players move pieces onto squares that they expect their opponent to target — especially the king’s position — castling becomes a way to improve the king’s mobility and secure its safety.
How to castle in chess
Castling involves both the king and a rook, moving the king two squares toward the chosen rook (the square that the king has crossed is now occupied by the rook). The rook moves up to the square that the king passed through on its journey. If the rook is moved first, then the castling will no longer be possible, as well as if the king has been moved previously. (If the king hasn’t been moved, however, then castling is still possible, assuming all other requirements are met.)
White kingside castling: king e1–g1; rook h1–f1
White queenside castling: king e1–c1; rook a1–d1
Black kingside castling: king e8–g8; rook h8–f8
Black queenside castling: king e8–c8; rook a8–d8
Kingside: short castling
Queenside: long castling
PGN: O-O (kingside) and O-O-O (queenside)
Letter O
Other publications: 0-0 and 0-0-0
Digit zero
When castling rights are permanently lost
A number of things may affect whether a player is allowed to castle:
King previously moved
One rook previously moved
Returning a piece to its starting square
Having faced an earlier check
Moving the king permanently loses both castling options, while moving one rook loses only the option involving that rook. Returning either piece to its starting square does not restore those rights, but having faced an earlier check does not by itself take them away.
If the king was moved prior to the current game state, then he cannot castle, even if he returns to his original position. If the relevant rook has also been moved, then that rook will never be able to castle again. Returning the king back to the starting square does not restore lost rights either. But if the king hasn’t been moved and the rook that has not been moved, then the king is still eligible to castle with that rook.
There are, however, certain situations where the king and rook could remain eligible to castle even though the current game state prevents it. In such cases, the pieces between the king and rook might simply need to move out of the way so that castling is possible.
Earlier checks don’t prevent castling either, provided that neither the king nor the relevant rook have moved from their initial positions.
Empty squares
In addition to movement restrictions, there are additional empty-square restrictions. These empty-square restrictions do not involve attacks against the king, but rather require that the king’s path to its destination remains unobstructed.
Here are the necessary empty squares, along with the king’s safe route (from its starting point to its destination):
White kingside: f1, g1 (empty); safe king route: e1, f1, g1
Black kingside: f8, g8 (empty); safe king route: e8, f8, g8
White queenside: b1, c1, d1 (empty); safe king route: e1, d1, c1
Black queenside: b8, c8, d8 (empty); safe king route: e8, d8, c8
In this case, the empty squares are all those between the king and rook, including b1 or b8 when castling queenside. Attacks on the rook aren’t a concern, but attacks on the king’s starting square, crossing square, or destination prevent castling.
It’s important to remember that the king cannot castle out of, through, or into check. For example, if your king is in danger on e1, then you cannot castle queen side. On the other hand, an attack on b8 alone does not prevent Black from castling queenside, provided that all other requirements are met: the king must be safe on e8, d8, and c8.
But what about when the king crosses an attacked square? This doesn’t mean that the rook is under attack, but merely that the square that the king passes through is under attack. Similarly, if the rook is under attack, then castling is still permissible as long as the rest of the conditions hold.
This distinction between an attacked square and being under attack is documented in at least one case: White’s queen is attacking f8, which prevents Black from castling kingside. However, if that queen were attacking b8 instead, Black would be able to castle queenside provided that all of the other conditions are met.

Reviewing the legality of a completed game
It’s very simple to look up the results of a game, but less so to actually determine whether each move was legal. This is especially true when you’ve returned the king to its starting square, and are trying to determine whether the previous player had the right to castle.
To properly review the legality of a completed game, you must first determine whether the player in question has retained the right to castle based on their movements before the blocker. Then you examine the board state to see if there is a valid path for the king to travel.
For example, in the Fischer–Najdorf game of 1962, Fischer (playing White) played 16.Ng7+ Ke7 17.Nf5+ Ke8. The king returned to e8, having been on the square earlier, which would normally indicate that castling rights had been lost. But because the same piece placement occurred after the sequence, you’d have to assume that castling rights had changed, despite appearances.
Fischer–Najdorf, 1962
Varna Olympiad, 1962. The sequence documented in Wikipedia’s castling article: 16.Ng7+ Ke7 17.Nf5+ Ke8.
What matters is whether the king and relevant rook have moved. If they haven’t, then castling rights remain, but castling is only possible if the squares between them are empty and the king does not castle out of, through, or into check.
Why you should castle
While the permission to castle is often tied to the position of the pieces, castling is typically considered a strategic decision. Castling improves the king’s safety, but can also increase the activity of the rook.
So the choice of which side to castle is dependent upon the current position. Sometimes the increased activity of the rook outweighs the benefit of king safety. On other occasions, the increased safety of the king may be enough to justify moving the rook away from the center.
But just because the king is mobile does not necessarily mean that you’ll end up in a better position than your opponent. A centralized king may be easy to attack, but it may also be easier to protect. On the other hand, if your opponent is unable to organize an attack on your centralized king, then castling may be unnecessary or even detrimental.
Sources
More in Chess Basics
- How En Passant Chess Captures WorkLearn en passant chess rules with White and Black examples, the immediate-reply requirement, and king-safety checks for completed-game review.
- How to Recognize and Avoid Stalemate in ChessRecognize stalemate in chess, distinguish it from checkmate, and review your completed game's ending to spot how the draw happened.
- How to Choose Great Opening Moves in Chess as a BeginnerChoose great opening moves in chess with 1.e4 or 1.d4, purposeful development and king safety, then review those decisions in completed games.