FEN is a common extension for a text file which contains six specific data records which represent a single position in a game of chess. Short for Forsythe-Edwards Notation, the file is best used for resuming a physical game which was interrupted. *.FEN files interact well with PGN software and chess engines, and are practically a requirement for some chess variants – such as Fischer Random – which have non-standard starting squares for the pieces.

Data Elements in a FEN file are separated by a space. The board definition is populated from File A to H, one Rank at a time, beginning with 8 and working down the board to 1. The black pieces are represented by lowercase letters; the white by uppercase. Empty squares are represented by a number, indicating consecutive empty squares from left to right.

ID Element Format Annotation
1 Position AZ#; rank separated by "/" see starting position below
2 Active Color {W,B} Single letter
3 Castling availability {KQkq} if neither available; "-"
4 En Passant square reference Square behind the pawn that moved two spaces; or "-"
5 Halfmove clock # Number of half moves since last capture or pawn move
6 Fullmove clock # Start at one; step after black moves; to fill PGN

The starting position of a standard game of chess is represented in FEN as:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR W KQkq – 0 1

After opening move 1.e4, the FEN representation would be:

rnbqkbnr/pppppppp/8/8/4p3/8/PPPP1PPP/RNBQKBNR B KQkq e3 0 1

If the game continued 1… Nf6 2.Nc3 c5 the FEN representation would be:

rnbqkb1r/pp1ppppp/5n2/2p5/4p3/2N5/PPPP1PPP/RNBQKBNR B KQkq c2 0 3

And the board itself would look like:


1 - Wikipedia. "Forsythe-Edwards Notation". Accessed 7/31/2019.