Forsyth-Edwards Notation (FEN)

A standard notation used to represent a specific position in a chess game, including piece placement, turn, and castling rights.

Introduction
The Forsyth-Edwards Notation (FEN) is a standardized way to describe a chess position using a single line of text. Unlike PGN (Portable Game Notation), which records moves, FEN represents the exact state of a game at any given moment. It is essential for chess engines, game analysis, and saving positions for later review.

What does FEN look like? How is it structured? And why is it important in modern chess? This article provides a complete breakdown of FEN, including how to read, write, and use it effectively.

1. What is FEN?

FEN is a text-based representation of a chess position, allowing chess programs and databases to store or transmit board states.

Example of a FEN string (starting position):
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq – 0 1

This FEN string contains everything needed to reconstruct the chessboard at the start of a game.

2. Structure of a FEN String

A FEN string consists of six space-separated fields:
[Piece Placement] [Active Color] [Castling Rights] [En Passant] [Halfmove Clock] [Fullmove Number]

2.1 Piece Placement (Field 1)

  • The first section describes the board from rank 8 to rank 1 (top to bottom).
  • Pieces are represented by letters:
  • Uppercase = White (K, Q, R, B, N, P)
  • Lowercase = Black (k, q, r, b, n, p)
  • Numbers indicate empty squares.

Example:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR

This represents the starting position.

2.2 Active Color (Field 2)

  • Indicates whose turn it is:
  • « w » = White to move
  • « b » = Black to move

Example:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w

The « w » means White moves next.

2.3 Castling Rights (Field 3)

  • Indicates which side can castle:
  • « K » = White can castle kingside
  • « Q » = White can castle queenside
  • « k » = Black can castle kingside
  • « q » = Black can castle queenside
  • « -«  = No castling rights

Example:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq

Both White and Black have full castling rights.

2.4 En Passant Target Square (Field 4)

  • Indicates if an en passant capture is available.
  • If a pawn moves two squares forward, the square where it could be captured en passant is recorded.
  • If no en passant is possible, this field is « -« .

Example:
rnbqkbnr/pppppppp/8/8/4Pp2/8/PPPP1PPP/RNBQKBNR w KQkq f6

White has just played e4, allowing Black to capture en passant on f6.

2.5 Halfmove Clock (Field 5)

  • Counts the number of halfmoves since the last pawn move or capture.
  • If this count reaches 50, a player can claim a draw under the 50-move rule.

Example:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq – 0

The « 0 » indicates no halfmoves have passed since the last pawn move or capture.

2.6 Fullmove Number (Field 6)

  • Represents the current move number.
  • Starts at 1 and increases after each Black move.

Example:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq – 0 1

The « 1 » means this is the first full move of the game.

3. Why FEN is Important

  • Used in chess engines and analysis: Chess engines like Stockfish use FEN to load and analyze positions.
  • Allows saving and sharing positions: Chess databases and online platforms use FEN to store ongoing or past positions.
  • Essential for correspondence chess: Players can record and continue games at any point.

4. How to Generate and Read FEN in Chess Software

  • Most online chess platforms (Lichess, Chess.com, ChessBase) allow you to copy a FEN string from a game.
  • You can input a FEN string into a chess engine or analysis tool to reconstruct the position.

5. Conclusion

Forsyth-Edwards Notation (FEN) is an essential tool for recording and analyzing chess positions. Whether you’re a beginner saving an interesting position or a grandmaster preparing an opening analysis, understanding FEN will help you work more effectively with chess engines and databases. By learning to read and write FEN, you can improve your game study, preparation, and analysis.

Be better at chess.

  • Manage & Learn chess database
  • Upload / Export / Merge .PGN files
  • Visualize chess in move tree format
  • FREE online chess tool
Get startedDiscover App