The FEN Standard

In my world wide web exploration, I just learned today how to read and interpret a fen standard or notation.

FEN stands for Forsyth-Edwards Notation. It is used to describe the particular position in a chess game. As compared against a PGN (Portable Game notation) file, a FEN describes the position at that particular point in time, while PGN describes how the game went on from the first move to the last. It’s weird that I was able to relate this two types of chess files to accounting and financial reporting. FEN is like the balance sheet, which presents the financial condition of an entity at a certain point in time. While, on the other hand, PGN is like the income statement, which presents how the operation went during a period of time.


Usually, when using chess applications, the program has the ability to save fen files as well as read and show automatically what is described in the fen file. However, what if you have no chess program to analyze this series of codes? How do you set up the position in say an actual chessboard to analyze that particular position?

One might wonder, why do you still need a fen file when you can have a position illustrated by an image (i.e., jpg, gif, bmp, tif, png, etc. type of files)?

  1. You cannot import the image file into your chess program and play through the game to analyze the position
  2. An image alone lacked a lot of data

To illustrate, take a look at the diagram below:

Chess Position

In this illustration, what do you miss?


  1. Active Color – which color is to move next
  2. Castling Availability – Is queenside or kingside castling (in-rook) still available to either black or white?
  3. En Passant Target Square – Can white/black make an en passant capture? In this specific example, how can you determine whether white can capture en passant at the pawn at d6?

This is where FEN comes into the picture. The following notation depicts the same position as above, with additional useful information to analyze the position:

r2qk2r/pp2ppp1/1n4n1/2ppP1Bp/1b1P2b1/P1N2N2/1PP1BPPP/R1Q1K2R w KQkq – 0 8

This notation is composed of six data fields. The first being:


…which is the piece placement data. It corresponds directly to the board coordinates starting from the eighth rank, from left to right. The small letters represent black, while the capital ones are white (where q-queen, k-king, b-bishop, r-rook, n-knight, p-pawn). The numbers represent the number of blank squares between last and next pieces described.

The second field, “w”, describes the active color and tells that white is to move next.

Castling availability is the third field. “KQkq” enjoins that both colors can still castle queenside or kingside. Of course, without this field, how would you know if the white or black king or the rooks have already moved and back to prohibit castling on that side? Note that this pertains to the “potential” future castling availabilitty, regardless of if there are any other pieces that block the rook and king at the moment. Capital letters represent white, and small letters black. K/k=kingside, Q/q=queenside. Other possible combinations include: Kkq, Kq, kq, etc. White always precede black, and the kingside always precede the queenside. If there are no castling available a “-” is used.

The fourth field (“-” in this case)is the en passant target square. It is only given if the last move was a pawn advance of two squares. Otherwise, “-” is again used. If given, it should represent the coordinates of the square at which the active player can capture via en passant. Obviously, it should be one of the squares in the 3rd and 6th rank. Examples include: e3, e6, d3, f6, etc.

The fifth field (0 in this example) is the halfmove clock. It is the measure of the number of halfmoves since the last pawn advance or capturing move. This value is used for the fifty move draw rule.

The sixth and the last field (8 in this case) is the fullmove number. It is measured by adding 1 to the nth move by black.

So, in conclusion, it’s not always true that a picture paints a thousand words.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s