Chess Terms
Forsyth-Edwards Notation (FEN)

Forsyth-Edwards Notation (FEN)

If you need to describe a position reached during a game of chess, how would you do it? The Forsyth-Edwards Notation (FEN for short) is one of the easiest ways.

Here is what you need to know about FEN:


What Is FEN?

FEN is the abbreviation of Forsyth-Edwards Notation, and it is the standard notation to describe positions of a chess game. Steven J. Edwards, a computer programmer, created this notation system based on another system designed by the journalist David Forsyth. Edwards modified the older notation system so that chess software could use it.

FEN can describe this position with a single line of text.
A single line of text can describe this position.

FEN differs from the Portable Game Notation (PGN) because it denotes only a single position instead of the moves that lead to it.

Why Is FEN Important?

FEN is important because it makes it easy to translate any chess position into a single line of text. It facilitates the process of recreating positions using computers and allows players to share them and restart games from any point they desire.

For this reason, FEN is especially helpful to chess teachers, coaches, trainers, and students. It replaces the need for chess mentors to send large PGN files to their students and speeds up the process of sharing positions, even when people are far apart.

How Does FEN Work?

FEN sequences are composed exclusively of ASCII characters so computers can recognize them. These strings have six different fields, each describing one aspect of a position and separated by a space character.

Piece Placement

The first field represents the placement of pieces. It starts describing the content of each square, beginning from the eighth rank and ending with the first. For each rank, squares begin from the first file and go to the eighth.

Lowercase letters describe the black pieces. Just like in PGN, "p" stands for pawn, "r" for rook, "n" for knight, "b" for bishop, "q" for queen, and "k" for king. The same letters are used for the white pieces, but they appear in uppercase. Empty squares are denoted by numbers from one to eight, depending on how many empty squares are between two pieces.

The FEN for the starting position of a chess game.
The sequence "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR" describes the piece placement field of the starting position of a game of chess.

The image below illustrates the way FEN records represent the position of the pieces.

Piece placement represented in FEN.
The FEN piece placement field for this position is "r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1"

Active Color

The second field indicates who moves next. This field always appears in lowercase, and "w" specifies that it is White's turn to move, while "b" indicates that Black plays next.

This position's FEN code indicates who plays next.
FEN: 8/8/8/4p1K1/2k1P3/8/8/8 b - - 0 1. Notice the "b" in the second field: it is Black's turn to move.

Castling Rights

The next field tells if the players can castle and to what side. Uppercase letters come first to indicate White's castling availability, followed by lowercase letters for Black's.

The letter "k" indicates that kingside castling is available, while "q" means that a player may castle queenside. The symbol "-" designates that neither side may castle. 

FEN
FEN: 4k2r/6r1/8/8/8/8/3R4/R3K3 w Qk - 0 1. The "Qk" in the third field indicates that White may castle queenside and Black may castle kingside.

Possible En Passant Targets

If a pawn has moved two squares immediately before a position is reached and is thus a possible target for an en passant capture, the FEN string adds the square behind the pawn in algebraic notation in its fourth field. If no en passant targets are available, the "-" symbol is used.

FEN for en passant targets.
FEN: rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1. Even though no pawns may capture the e4-pawn, the FEN string would still contain the en passant target square e3 in its fourth field.

Notice that the mere fact that a pawn has moved two squares implies that this indicator of a possible en passant capture would be present. The absence of enemy pawns threatening that capture does not influence this notation.

Halfmove Clock

The next field of the FEN code informs how many moves both players have made since the last pawn advance or piece capture—known by chess programmers as the number of halfmoves. This field is useful to enforce the 50-move draw rule. When this counter reaches 100 (allowing each player to make 50 moves), the game ends in a draw.

FEN halfmove clock.
FEN: 8/5k2/3p4/1p1Pp2p/pP2Pp1P/P4P1K/8/8 b - - 99 50. The fifth field of this string tells us that this game ends in a draw on the next move.

Fullmove Number

The sixth and last field of the FEN code shows the number of completed turns in the game. This number is incremented by one every time Black moves. Chess programmers call this a fullmove.

How To Use FEN In Chess.com

You just learned how the FEN system works and how to create one yourself, but that does not mean that you need to do it by hand. Chess.com can do all the hard work for you and provide you with the FEN code for any position automatically.

If you want to share a specific position with others, all you have to do is click the share button that you can find in any of your games or in the Analysis Board. Next, when you select the PGN option, the FEN string appears at the top of the window.

Share your FEN with other people using Chess.com.

If you already have a FEN code and you want to translate it to a position, you can also do that very quickly on Chess.com. Go to the Analysis Board and select the Load FEN option. Next, you should paste the FEN code in the field that pops up and click Load.

Quickly load positions using FEN on Chess.com.

Conclusion

You now know what FEN is and its importance. You can also use it to share and check any position you would like. Now head over to our the Analysis Board to test out the FEN feature!

Explore More Chess Terms