Castling might be one of the best moves in all of chess. It lets you move two pieces simultaneously and will normally place your king in a safe position for the rest of the game.
Someone that doesn’t know the castling move might even accuse you of cheating when he/she sees it for the first time!
But don’t let that deter you. Castling is a completely legal move in chess, and you want to use it in most of your games.
So let’s go over everything you need to know about castling in chess, so you can start winning more game!
How to castle in chess?
In order to castle, you move your king two squares horizontally towards one of your rooks and move the rook to the opposite side of the king. This is the only time in chess that a rook can jump over a piece.
Since you have two rooks, you can castle with either the kingside rook on h1 or with the queenside rook on a1. The former is called “kingside castling” or “castling short“, and the latter is referred to as “queenside castling” or “castling long“.
Both castling long and short have pros and cons. So you have to think carefully before deciding on which side of the board you want to castle. Because once you castled on one side, you can no longer castle on the other side of the board.
I’ll go over how to choose where to castle later. First, let’s look at some basic example of castling on both the kingside and the queenside.
Kingside castling in chess
When castling on the kingside, the king moves two squares to g1 and the rook on h1 jumps over the king to move to the f1 square.
Below, you can see what castling kingside looks like before and after on an empty chessboard:
Normally, by the time you castle, there are still plenty of other pieces on the chess board. If your kingside pawns are still on their original squares on f2, g2, and h2 they will provide your king with a lot of protection from attacks.
Below you can find a more realistic chess position in which white just castled kingside. You can see that the white king is much safer on g1 than it was on the e1 square.
Queenside castling in chess
When castling on the queenside, the king moves two squares to c1 and the rook on a1 jumps over the king to move to the d1 square.
Below, you can see what castling queenside looks like before and after on an empty chessboard:
Normally, by the time you castle, there are still plenty of other pieces on the chess board. If your queenside pawns are still on their original squares on a2, b2, and c2 they will provide your king with a lot of protection from attacks.
Below you can find a more realistic chess position in which white just castled queenside. You can see that the white king is much safer on c1 than it was on the e1 square.
However, when castling queenside your king isn’t as safe as castling kingside. This is because normally the c1 to h6 diagonal is open. So your king on c1 might be attacked diagonally by a bishop or queen in the future.
You might have to spend a second turn to move your king to b1 at some point. However, the benefit of queenside castling is that your rook is on d1. The d file will often open up in the middlegame or is perhaps already half open, which means your rook will be very active on d1.
Can you undo castling?
You are not allowed to undo or reverse your castling move. Once you have committed your king to one side of the board, it will normally stay there until the endgame starts.
Although there is no “un-castling” move in chess, you can move your king square by square to the other side of the board if you want to. However, to move your king from g1 to b1 or vice versa will take 5 moves. So you only want to march your king across the board if you absolutely have to or if you are in the endgame.
When can you castle in chess?
You can not castle anytime you wish. There are 4 conditions you need to fulfill before you can castle. If you do not meet one or several of these rules, you are not allowed to castle.
This sounds like a lot of rules to remember, but they are all very straightforward.
So let’s look at these 4 castling rules one by one:
1. Both the king and rook have not moved yet
You can only castle if both the king and the rook you want to castle with have not moved since the beginning of the game.
If you moved the king, you can no longer castle short or long. And if you have moved one of your rooks, you can no longer castle on that side of the board.
However, if you have only moved one of the rooks, you can still castle with the other rook.
Moreover, it’s important to realize that the rules states you can’t castle if you moved either the rook or king. So if you move your king to e2 and back to e1 on the next move, you still can’t castle even though both the king is back on its original square.
Let’s look at an example!
In the position below, white has the option of castling either kingside or queenside, since the king and the rooks haven’t moved yet. However, black can only castle kingside, because he has moved his queenside rook to b8.
2. There are no pieces between the king and rook
You can only castle if there are no pieces between the king and rook. If you want to castle kingside, the f1 and g1 squares need to be empty. And if you want to castle queenside, the b1, c1 and d1 squares need to be empty.
This means that you can’t castle right away. You first need to develop some of your other pieces such as the knight and bishop before you can castle.
If you want to castle queenside, you also have to move your queen. So it is a little more difficult to castle on the queenside compared to the kingside.
Let’s look at an example again!
In the position below, white can only castle kingside because the knight on b1 prevents white from castling queenside. Black can also only castle kingside, because he already moved his a8 rook to d8.
3. The king is not currently in check
You can not castle if your king is in check, regardless of which of the opponent’s pieces is giving the check. You first have to block the check or capture the piece that is giving the check. After dealing with the check, you can still castle on one of your future moves.
In the diagram below it is black’s move. Black isn’t allowed to castle kingside, because the bishop on b5 is giving check. However, black can block the check by playing his own c8 bishop to d7 on this turn, and try to castle on the next move.
Another thing to keep in mind is that you also are not allowed to castle out of a checkmate.
4. The two squares the king needs to move are not under attack
When castling, your king moves two squares horizontally and the rook jumps over. However, if one of the two square that the king moves is under attack, you are not allowed to castle.
The reason for this is that you would move your king into a check or through a check during the castling move.
This castling rule makes a lot more sense after looking at an example. So let’s take a look at the position shown below.
In this position, white is not allowed to castle either kingside or queenside. Black’s bishop on a6 keeps an eye on the f1 square, which prevents white from castling kingside. And the bishop on a3 is attacking the c1 square, which prevents white from castling queenside.
However, if it was black’s move, he would be able to castle kingside, but not queenside due to white’s knight attacking the c8 square.
Why castle in chess?
There are two main reasons why you want to castle in most of your games. First, castling helps you place your king in a safe location. And secondly, castling helps you to develop one of your rooks to a more active square.
In most games, you will sooner or later move your d and e pawns in order to develop your pieces and grab some space in the center of the board. However, this also leaves your king vulnerable, because you are opening up lines and diagonals from which the opponent’s pieces can attack your king.
A king feels much safer when it’s tucked away to one side of the board behind its own pawns, as shown in the diagram below.
Moreover, by castling you can activate one of your rooks. Rooks want to be on open or semi-open files. In most games, the d and e files opens up first because these are the pawns you will move first. So you want to move your rooks to d1 and e1.
However, if your king is still in the middle of the board, you are blocking your rooks from coming to the center.
So castling will give you extra king safety and help you develop your rook. And you get all of that with just one move!
If you wanted to do all of that with regular moves, you will need to move the king twice and rook once. So by castling you basically save yourself 2 moves.
Should you always castle in chess?
As a useful rule of thumb for beginners, you want to castle in almost all your games and castle relatively early on. This will make sure that your king is safe before the opponent starts his attack.
If you start attacking without taking care of your king first, your opponent might come with a crushing counterattack.
However, there are some situations where you don’t have to castle, or when it’s better not to castle.
When should I not castle in chess?
You should not castle if it will decrease the safety of your king. For example, if the opponent’s pieces have already launched an attack on the flanks.
Additionally, in endgames in which you don’t have to be afraid of getting checkmated, your king will be more useful in the center of the board, so you shouldn’t castle.
Let’s look at some examples for both cases!
In the position shown below, you can see that white has the option to castle kingside. However, the black queen and bishop are already eyeing the g2 square. So if you castle, you will be checkmated on the next move. In this case it’s better not to castle or to castle queenside later on in the game.
Of course, that was a pretty obvious example. The position below is another example of when you should not castle.
Although you might not get checkmated directly, black has already shown that he want to attack on the kingside by moving his f and g pawns very far forward. If you castle kingside now, you’ll run into trouble really soon.
Below you can find a third example of when you shouldn’t castle.
The white king can castle both kingside and queenside. But on the queenside you are missing two important pawns, and on the kingside you already moved your pawns forward.
In this case your king will be safer in the center. Especially since your d and e pawns haven’t moved too far forward yet.
Now let’s consider the second scenario. If several pieces have already been captured, the chance that you will be checkmated in the middle of the board becomes smaller and smaller.
Especially if your opponent no longer has a queen, your king can be pretty safe in the middle of the board. And in many endgames, you want your king to actively contribute to the fight!
So if you have reached the endgame and didn’t castle yet, it’s generally better not to castle at all.
In the position below, white can castle short if he wants to. But the king is actually better on e1 than it would be on g1.
A rook and pawn together can’t checkmate you, so you don’t have to worry about king safety.
And you might even play your king to e2 to start attacking the isolated pawn with your king and bring your rook into the attack later as well.
Is it better to castle king or queenside?
Castling kingside and queenside both have pros and cons. When castling kingside your king is a little safer on g1 than your king would be on c1 after castling queenside, because the c1-h6 diagonal is normally open.
Moreover, castling on the kingside is a little easier because you only have to develop your kingside bishop and knight. But if you want to castle on the queenside you’ll have to move the bishop, knight, and queen to make enough room for castling.
However, if you do castle on the queenside, your rook will directly be on d1 where it is normally more active than the rook on f1 would be after castling kingside.
However, castling kingside or queenside is not inherently better or worse than the other. You have to look at all the other pieces in the position to determine if you should castle kingside or queenside.
Is your opponent already starting an attack on the kingside? Then quickly castle queenside to place your king out of danger.
Did you push or lose several pawns on the queenside? Then your king will be safer after castling kingside.
Are you planning on attacking your opponent on the kingside by pushing your own pawns? Then you probably want to castle queenside.
These are just a few things to consider when choosing which side to castle on. With experience, you’ll be able to get a better understanding of which side you should castle on.
Should you castle on the same side as your opponent?
Castling on the same side of the board is a good idea if you are looking for a quiet position. Since you both castled on the same side of the board, neither of you can start attacking the opponent’s king with pawns, because that would weaken your own king’s safety.
Should you castle on opposite sides?
When you castle on opposite sides of the board, the game will often turn into a fierce battle. After castling, both players can start to move the pawns on the other side of the board forwards to break open the opponent’s king position.
In the position below, you can see a chess game in which the players decided to castle on opposite sides of the board. Both players have started to push their pawns to attack the opponent’s king. It won’t take long before one of the kings get checkmated.
Positions with opposite side castling can be incredibly fun to play. But often it can be a double-edged blade. So be careful and don’t castle on the opposite site if your attack is slower than your opponent’s attack.
Frequently asked questions
Can you castle out of check in chess?
No, if you are currently in check you are not allowed to castle. You will first have to block the check or capture the piece that is giving the check. Once you have dealt with the check, you can castle on a later move.
For more information, read my article on castling out, through, and into a check.
Can you castle through check?
No, the two squares that the king has to move when castling both have to be safe. If one or both of these square are currently under attack by one of your opponent’s pieces, you are not allowed to castle.
Can castling be done on both sides?
Yes, you can castle on both sides of the board, also referred to as kingside castling and queenside castling. However, you can not castle on both side in the same game. You can only castle once per game.
Can you castle with both rooks?
Yes, you can castle with either of your two rooks. If you castle with the rook on a1 you call it queenside castling, and if you castle with the rook on h1 it is called kingside castling. But you can’t castle with both rooks at the same time or in the same game.
Can the queen castle?
No, castling is a move you can only make with the king and one of your rooks. You can not castle with a king and queen or with a queen and rook.
Can you castle if you have moved pawns?
Yes, you can castle regardless if you have moved any of your pawns. However, if you have moved all the pawns on one side of the board, then your king won’t be very safe if you castle to that direction. It’s generally better to castle to the direction where the flank pawns are still on their original squares.
Can a king move after castling?
Yes, you can not move your king before castling, but you are allowed to move the king and rook after castling. In the endgame, your king becomes one of the strongest pieces, and you should move it towards the center.
For more information, you can read my article on how the king moves in chess.
Can you castle after check?
Yes, you can castle after check. However, you are not allowed to castle when you are in check. So you first have to block the check with one of your other pieces, or you have to capture the piece that is giving check. Afterwards, you can still castle on one of your future moves.