Chessmate

FEN

English term: Forsyth-Edwards Notation

FEN is a one-line text description of a single chess position and its relevant game state.

Its six fields describe piece placement, side to move, castling rights, an en-passant target, the halfmove clock, and the fullmove number.

By Chessmate Team · Reviewed

FEN contains six fields

The fields describe piece placement, the active colour, castling availability, an en passant target square, the halfmove clock, and the fullmove number. Spaces separate the fields.

Two fields cause the most confusion. The active colour names the side that moves next, so a FEN taken right after White plays 1.e4 carries a b. The last two numbers are separate counters: the halfmove clock counts plies since the last pawn move or capture, and the fullmove number counts the turns of the whole game.

FieldStart valueWhat it records
Piece placementrnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNREvery occupied and empty square
Active colourwWhite is to move
CastlingKQkqBoth sides retain both castling rights
En passant-No en passant target square
Halfmove clock0Plies since the last pawn move or capture
Fullmove number1Move number, increased after Black moves

Piece placement is read from rank 8 to rank 1

Slashes separate ranks. Letters identify pieces, uppercase letters are White, lowercase letters are Black, and digits count consecutive empty squares within a rank.

Check any rank by adding it up. In pppp1ppp, four pawns, one empty square and three more pawns make eight squares, and every rank in a valid FEN totals eight. A digit never counts squares across a slash, and the first rank written is rank 8, where Black's pieces start.

8
Eight consecutive empty squares.
3k4
Three empty squares, a black king, then four empty squares.

Make a move and see which FEN fields change

A move changes only some parts of the FEN. The active colour always flips, and the piece placement changes where a piece moved or was captured. The other fields follow fixed rules. The halfmove clock goes up by one after a quiet move and resets to 0 after a pawn move or capture. The fullmove number goes up by one only after Black moves. The castling field loses letters when a king or rook leaves its home square. The en passant field names the square behind a pawn that has just advanced two squares, and it returns to - after the next move.

The halfmove clock is the count behind the fifty-move rule: once it reaches 100 plies, a player may claim a draw. Reading it as moves instead of plies is a common mistake, and so is expecting the en passant field to appear only when a capture is possible. In the original specification the square is recorded after every two-square advance, as the board below shows.

Play one of Black's four moves and read how the FEN changes.

Play one of Black's four moves and read how the FEN changes.

Black to move after 1.e4 e5 2.Nf3, with the FEN rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2. Each of the four moves changes different fields.

FEN stores the current state, not the full history

FEN preserves the state needed to continue a game, including castling and en passant information. It does not list earlier moves, player names, comments, or variations; PGN is used for those records.

Under the original FEN specification, an en passant target is recorded after every two-square pawn advance even when no opposing pawn can legally capture there. FEN also cannot establish a threefold repetition claim by itself because it does not contain the earlier positions.

Related reading