Most moves are written as a piece letter and a square. Castling, en passant and promotion break that pattern, because each one changes the board in a way that a single square name cannot describe.
You will learn the signs for both kinds of castling and the conditions behind them, which square to write for an en passant capture and how to record the new piece when a pawn reaches the far end.
Castling: O-O and O-O-O
Castling moves two pieces in one turn. The king goes two squares toward a rook, and that rook jumps to the square the king passed over. The record is the letter O repeated with hyphens, with no square name at all.
| Written | Name | White king and rook | Black king and rook |
|---|---|---|---|
| O-O | kingside castling | g1 and f1 | g8 and f8 |
| O-O-O | queenside castling | c1 and d1 | c8 and d8 |
r3k2r/pppqpppp/8/8/8/8/PPPQPPPP/R3K2R w KQkq - 0 1To remember which is which, count the squares between king and rook before the move. There are two on the kingside, matching two letters, and three on the queenside, matching three.
Some scoresheets use zeros in place of the letter. Computer game files use the letter O. A check or mate sign, if needed, follows as it would after any move. The ordinary signs are explained in algebraic notation for beginners.
When castling is legal
The spelling is easy. The conditions are where records go wrong, since a move written as O-O must have been allowed at that moment.
All of these must be true
- The king has not moved earlier in the game.
- The rook you castle with has not moved.
- Every square between the king and that rook is empty.
- The king is not in check.
- The king does not cross a square that an enemy piece attacks.
- The king does not land on an attacked square.
The first two conditions are permanent. Once the king has moved, that side cannot castle again, even if the king walks back home. A rook that has moved removes castling on its own side only. The other conditions are temporary: when the obstacle or attack disappears, castling can become possible.
For attacks, only the king's route counts. The rook may be under attack, and on the queenside it may travel across an attacked square.
1r3r1k/6pp/8/8/8/8/P5PP/R3K2R w KQ - 0 1Here the king would have to pass over f1 to castle short, and the black rook controls it. On the long side the king travels through d1 to c1. Neither is attacked, and the square b1 is crossed by the rook alone.
En passant: write the square the pawn lands on
A pawn that advances two squares from its starting rank can be captured as if it had moved only one. The capturing pawn must stand directly beside it after the jump, on the same rank and a neighboring file. The capture has to be made at once, on the very next move, or the chance is gone.
4k3/6pp/8/3pP3/8/8/6PP/4K3 w - d6 0 2The record looks like any pawn capture: the file of the capturing pawn, an x and the square where it arrives. In the diagram the white pawn leaves e5 and appears on d6, and the black pawn on d5 is removed. You write exd6, because d6 is the destination, even though nothing stood there.
Some players add the letters e.p. after the move. Standard computer files do not need them. The skipped square also appears in position codes, in a field described under the six fields of FEN.
Promotion and the equals sign
A pawn that reaches the last rank must be replaced, as part of the same move, by a queen, rook, bishop or knight of its own color. It cannot stay a pawn and it cannot become a king. The choice does not depend on what has been captured, so a second queen is allowed.
Write the destination square, then an equals sign, then the letter of the new piece. If the pawn captured as it promoted, keep the capture form in front. A check or mate sign goes last.
| Written | Meaning |
|---|---|
| g8=Q | a pawn reaches g8 and becomes a queen |
| g8=R | the pawn becomes a rook instead |
| f8=N+ | the new piece is a knight, and it gives check |
| bxa8=Q | the b-pawn captures on a8 and becomes a queen |
Handwritten records sometimes leave out the equals sign and put the piece letter straight after the square. Computer game files keep the sign.
Underpromotion: when a queen is the wrong choice
Choosing anything other than a queen is called underpromotion. You will not need it often, but two reasons for it are easy to see on a board: a new knight can attack where a queen cannot, and a piece with fewer moves can avoid stalemate.
8/3q1P1k/8/8/8/8/P7/6K1 w - - 0 1The black king must step out of check, and White then takes the queen with Nxd7 while keeping the a-pawn. Every other first move, including making a new queen, gives up the win.
8/6P1/7k/8/6K1/8/8/8 w - - 0 1After g8=Q the new queen and the white king would cover every square around the black king without checking it, so the game would end in a draw. A rook leaves h7 open. Black can still move, and White keeps enough force to win.
Common mistakes with special moves
- Writing castling as a king move. The record is O-O or O-O-O, not Kg1.
- Using the wrong length. Two squares between king and rook go with the short sign, three with the long one.
- Naming the captured pawn's square. En passant is written with the arrival square.
- Capturing en passant late. After any other move, that right has expired.
- Leaving out the new piece. A bare g8 does not say what the pawn became.
If a game record stops making sense, check these move types early. A forgotten promotion leaves the wrong piece on the board, and a forgotten removal after en passant leaves one pawn too many. When two like pieces cause the confusion instead, see how to tell them apart.
To try the situations yourself, set them up in the Board builder, where you can also choose the castling rights and the en passant square. A position code that claims rights the pieces cannot support is one of the faults listed in why a FEN is rejected.
Common questions
Can you castle after your king has been in check?
Yes, as long as the king has not moved. You cannot castle while it is still in check.
Can you castle if the rook is attacked?
Yes. The safety conditions apply to the king's square, the square it crosses and the square where it lands.
Which square do you write for en passant?
Write the square where the capturing pawn finishes, which is the one the enemy pawn skipped. An example is exd6.
Can you promote to a queen if you still have one?
Yes. A pawn may become a queen, rook, bishop or knight no matter which pieces are still on the board.
Sources
- FIDE Laws of Chess taking effect from 1 January 2023. International Chess Federation (FIDE) Handbook. Rules of movement (Article 3), end of the game (Article 5), recording moves (Article 8), drawn positions (Article 9) and algebraic notation (Appendix C). Consulted on 25 November 2026.
- Portable Game Notation Specification and Implementation Guide. Coordinated by Steven J. Edwards. Standard algebraic notation (section 8.2.3) and the FEN position format (section 16.1). Consulted on 25 November 2026.