Castling in Chess: A Complete Castling Guide

Castling in Chess is a special move involving your king and one of your rooks. Additionally, there are only two types of castling: kingside and queenside castling. The popular French writer/reformer Voltaire once said, “The danger which is least expected soonest comes to us.”

When it comes to chess, this quote is especially relevant. In order to limit the danger potentially thrown at us by our opponent, how can we ensure the best safety for our king? [hint: castling]

To answer this question, we shall discuss one of the most viable techniques in king safety: castling (aka 0-0 or 0-0-0 in chess notation)!

castling in chess

What is King Safety?

In order to deeply discuss king safety, we must understand two very important ideas in chess: weak squares and strong squares.

Castling in Chess: Weak Squares vs. Strong Squares

To get a better idea of what weak and strong squares look like, let’s look at a reset board:

As you can see, chessboard squares are classified by how many pieces interact with that square in relation to your opponent. For a reset board, the third and sixth ranks (highlighted with green markers) are very strong squares that only interact with your pieces.
To clarify, these specific squares are under control by you and you only!

In the ultimate goal of checkmating your opponent, it is crucial to increase the number of strong squares you have over time.

Strong squares - Castling

However, let’s say white plays e4 and black plays e5. In this new scenario, the d3/f3 and d6/f6 squares (highlighted in red) become less defended, while the central squares become more defended.

The same thing happens when we move our pieces as shown in the figure below:

Weak squares - Castling

The dynamics of weak and strong squares will become important when looking at the goals of chess as a whole.

Recognizing the Goals of Chess:

1. To keep our king near strong, well-defended squares

2. To attack our opponent and checkmate him/her

Both of these goals are equally important when playing. Though there are many ways to attack and checkmate our opponents, the most popular way to ensure king’s safety is through castling. Now, we will discuss what castling is, when to castle, and why we castle.

Fun Fact: Outside of castling, you have likely heard the common saying that it is crucial to “maintain a solid center.” Though it may sound easy at first, it can become very difficult to maintain without an understanding of weak and strong squares.

In understanding this, we can then say that king safety is the idea of keeping your king around pieces on strong squares or around pieces that defend strong squares.

Castling in Chess: What is Castling?

Castling is a special move involving your king and one of your rooks. Additionally, there are only two types of castling: kingside and queenside castling.

In order to kingside castle, you need to move your king two squares toward the kingside rook and then place the kingside rook over next to the king (on either the f1 or f8 squares, depending on if you are playing as White or Black)

In order to queenside castle, you need to move your king two squares toward the queenside rook and then place the queenside rook over next to the king (this time either on the d1 or d8 squares)

Also, take a look at the diagram below to see what both forms of castling looks like before and after for both the Black and White sides:

Before Castling: 

Kingside Castle vs Queenside Castle

After Castling:

How do you Finish Castling?

To note, castling is done in one move and involves the rearrangement of two pieces, given certain conditions that we will discuss. Additionally, you should notice that castling requires ALL pieces between the king and rook to be out of the way. This makes sense because you can’t pile up pieces onto a single square.

Other Rules of Castling:

You cannot castle, under any means, if you have already moved your king (that is why it is good to castle early before your opponent forces you to move your king to an awkward/unsafe square).

However, if you have already been forced to move your king, don’t lose hope!

You can still do what is called an artificial castle, which is when you take at least three moves to get your king into the 2nd rank, your rook onto the right square, and then your king again back to a safer position on the 1st rank.

Additionally, you cannot castle if the rook you want to castle with has moved. However, if you want to queenside castle (with your a1 rook) but your h1 rook has moved, you can still castle queenside.

If a piece blocks the way for your king to castle (as shown by the bishop in the figure below), you also cannot castle.

When you cannot castle?

As a recap, if you have moved your king/rook (or your opponent’s piece blocks you from castling), you cannot castle. Otherwise, you should castle early and often!

Castling in Chess: When to Castle, and Why?

As a general rule, you should always aim for the castle as soon as possible.

It may be tempting to push it off while you develop and get a good attack starting, but, as Voltaire put it, “danger which is least expected soonest comes to us.

But before you do, you should look at what your plans are and what you believe your opponents plan to be.

For example, if you are playing a Queen’s Pawn Opening, which calls for solid centralized development and queenside attacks, it would be usually wiser to castle on the kingside to ensure you can focus all the queenside pieces to attacking.

Also, if pieces have to juggle defense and attacking, they can easily become overextended—in other words, they will be stretched to their limits!

Now that you have developed a few pieces, some pawns, and have a good general plan of what you want to do in the game, look at your pawns on the king and queen sides.

Ask yourself:

Are they pushed too far up, leading to weaknesses as shown in red in the figure below?

When you shouldn't castle?

Maybe it wouldn’t be the best idea to castle for White on the kingside in this example.

However, because of Black’s more stable pawn structure, it would be a good idea for Black to castle kingside. As a recap, here are the 3 basic steps behind deciding when and where to castle:

  • Develop pieces and a few pawns if necessary (remember you can’t move pawns backward!)
  • Make a plan and realize your opponent’s likely plans.
  • Decide which side to castle and do not let your pieces get too overextended between attack and defense.

Ideas to Keep in Mind Once You Have Castled:

Firstly, once you have castled successfully, pat yourself on the back. You did it! You managed to get your king into a safer position, thus making it harder for your opponent to checkmate you.

Now that you are castled, do not move pawns on the side that you have castled unnecessarily. You may need to neutralize an attack with pawns. But, keep in mind a castled side is not perfectly safe alone.

Specifically, if you do not have enough pieces defending, your opponent may have opportunities to sacrifice their pieces in order to win the game. As shown in the game below, Emmanuel Lasker makes an amazing sacrifice known as the “Greek Gift sacrifice” on his opponent, Johann Hermann Bauer, in this game.

Check it out:

var viewer = new CHESS.PgnViewer({
pgn_uri: ‘pgngames/general/castling-in-chess/Greek-Gift-Sacrifice-Game.pgn’,
piece_set: ‘/canvaschess/img/pieces/merida’,
show_tags: true

Additionally, a game where Black moved too many pawns on both the King and Queen sides (and delayed castling). Because of that, Black was unable to castle in time to save his king because the game was already over!:

var viewer = new CHESS.PgnViewer({
pgn_uri: ‘pgngames/general/castling-in-chess/Unstable-Kingside-Game-Example.pgn’,
piece_set: ‘/canvaschess/img/pieces/merida’,
show_tags: true

But be careful as the attacker! If you decide to attack a castled king, you must be sure the attack is sound. If in the previous game we change the Black queen’s position just slightly (as shown below), the sacrifice becomes completely nullified because Black will have enough time to defend.

Try to not clutter the castled area with your pieces!

Unless you are being attacked heavily or there are threats made against your position, it is best to keep pieces diversely aimed at your opponent’s king.

A common middlegame setup arising from dozens of openings is in keeping the heavy rooks focussed on king/pawn structure safety while having minor pieces and the queen doing a good job of both defending and attacking.

Below is a snapshot of one of these kinds of positions.

Advanced means to protect your king even better!

As you continue in your chess journey, you’ll be sure to find new and interesting ways to attack and defend. In this final content section, we will go through some more advanced techniques regarding castling depending on which side you castle.

Castling in Chess: Kingside Castling Techniques

  • A common technique on the kingside to both provide more safety to the king. It also allows for queenside attacks in the bishop’s fianchetto. The castled-side technique may sound complicated. But, it is as simple as moving the pawn above your castled king and placing your bishop in its place. As you can see in the figure below, each castled king is well-protected. And, each castled king’s bishop provides great attacking measures to the opponent’s queenside.
  • An additional technique seen in many grandmaster games is the sidestep of the king to the last file, as shown in this game below:

It may seem like an unnecessary move. But, it provides the Black king with an added level of safety from bishop-related pins. Also, it can allow for kingside attacks. In this Kings-Indian Defence setup, it is actually very common for Black to attack the castled side.

In the diagram below, you can see both techniques on the board shown with both the Black and White pieces:

Castling Techniques

Queenside Castling Techniques

On the castled queenside, a well-used technique is the sidestep of the king to the b-file. Similar to the other sidestep to the a-file, this helps to prevent pins on the king on the c-file.

Additionally, it allows you to possibly switch over the attack to the center/queenside. It’s possible since the a-pawn weakness is covered by the king.

Another technique, though rarer, is the queenside bishop fianchetto on the queenside castle, as shown below.

For similar reasons to the kingside castle fianchetto, the queenside castle fianchetto can allow your king to be in a safer position while you focus your attacks on the center and kingside.

Castling in Chess: Conclusion

Below you can see the queenside castling techniques in action for both the Black and White pieces:

More examples castling

Now you know what king safety is, how to castle, when to castle, and why you should castle. So, you should be on your way to understanding this beautiful game even better!

To end this article, let’s do a brief recap of all the major ideas discussed.

If you feel a little lost on any of the ideas below, either take another look at the section outlined in this article or let us know of your questions in the comments:

Weak vs. Strong Squares [Recognize them, Support them, and Utilize them!]

On Castling (0-0 or 0-0-0)

  • You can castle either on the queenside (0-0-0) or kingside (0-0)
  • Try to the castle as soon as you can
  • Make sure you make a plan and try to see what your opponent’s plans might be before castling too hastily

After Castling

  • Don’t move your castled-side pawns too quickly
  • Stay aware of your opponent’s possible attacks
  • Don’t clutter the castled area with your pieces

Bonus: Positional Puzzle!

It can be hard to decide which side to castle! Even if you develop pieces/pawns, make a plan, and try to figure out what your opponent is doing. Many times, the side you castle determines which side you attack. It also determines which side you defend which is why many leave it for later.

In the position below, take a look at your structure as White and your opponent’s structure. There are certainly many other moves you could play other than 0-0 or 0-0-0 (castling shorthand for kingside castle and queenside castle, respectively). But, if you had to play either, which would you play and why?

Once you have analyzed the position for yourself, write in the comments what YOU think is the best idea. And, let us know your thinking behind it (your plan, what you think your opponent might do, etc).


White to move

Castling in Chess: Want to improve your chess?

Good positional understanding is one of the main criteria separating masters from club players. Everyone knows how to study tactics, openings, and endgames.

But, when it comes to something more sophisticated like positional understanding – the majority of players simply don’t know where to start.

This course will fix it!

comprehensive positional course

Get Comprehensive Positional Course 50% off [use code CHESS50]

Find this post useful? Share it?
Updated 01.03.2024


Both would castle on the queen's side? Because of bh3 (white) and bh6 (black)
Daniel Noon:
Hi Raj, Thanks for your comment! Be sure to check out all that TCW has to offer.
Raj G:
Amazing article daniel. I never thought about castling this deeply before!
Yury Markushin:
Hi Oliver, what position are you referring to? Or you talking in general? Cheers!
Yury Markushin:
Thanks for your comment. There are few popular strategies. Attack in the center is one of them.But castlign is usually better than not casting at all.. although there are always exceptions to every rule!
Yury Markushin:
Thanks for your reply. That really depends on position. Sometimes casting kingside can lead to mate-in-1 :)
Yury Markushin:
Thanks and good luck with the attack on the center. Let me know how it went!
Nice guide. I would try to castle queenside to get centerattack with pawn
White shud castle kingside to give the best safety to it.
Ashley J:
I think white should play queenside and try to get an attack in the center
Oliver J:
Great guide! I think white should castle kingside because it would be unsafe to do so on the queenside cuz of the advanced pawns on that side.