This guide is part of the chess tools collection. Keep all six fields when moving a position between a board editor, study file, puzzle, or analysis session.
The six fields of a FEN string
Every standard FEN record contains six fields separated by spaces:
piece-placement side-to-move castling en-passant halfmove fullmove
The initial chess position is:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
| Field | Starting-position value | Meaning |
|---|---|---|
| Piece placement | rnbqkbnr/.../RNBQKBNR | Contents of all 64 squares |
| Side to move | w | White moves next |
| Castling rights | KQkq | Both sides retain both rights |
| En-passant target | - | No target square |
| Halfmove clock | 0 | Zero moves since a pawn move or capture |
| Fullmove number | 1 | The game is on move one |
Show answer
After the board field, `w` means White to move and `KQkq` records all four castling rights.
Field 1: piece placement
The first field describes the board rank by rank, beginning with rank 8 and ending with rank 1. A slash separates one rank from the next. Within each rank:
K,Q,R,B,N, andPare White's pieces.k,q,r,b,n, andpare Black's pieces.- A digit from 1 to 8 represents that many consecutive empty squares.
The first rank segment in the starting FEN is rnbqkbnr. Reading from a8 to h8, it places Black's rook, knight, bishop, queen, king, bishop, knight, and rook. The third segment is 8, meaning every square on rank 6 is empty.
Each expanded rank must contain exactly eight squares. For example, 3p2P1 expands to three empty squares, a black pawn, two empty squares, a white pawn, and one empty square: 3 + 1 + 2 + 1 + 1 = 8.
Field 2: side to move
The second field is either:
w— White moves next.b— Black moves next.
This single character can completely change the evaluation. A side may have a winning tactic when it moves first and be checkmated when the opponent moves first. Never copy only the board field when sharing a puzzle.
Field 3: castling rights
The castling field uses one or more letters:
K— White may castle kingside.Q— White may castle queenside.k— Black may castle kingside.q— Black may castle queenside.-— no castling rights remain.
The usual order is KQkq. These letters represent retained rights, not a promise that castling is legal on the next move. Pieces may still block the route, the king may be in check, or a crossing square may be attacked. Conversely, a king and rook on their original squares do not prove the right exists; either may have moved and returned. Review when castling is legal for the full move test.
Field 4: en-passant target square
The fourth field is a square such as e3 or a dash. In the original FEN specification, after a pawn advances two squares, this field records the square it passed over. After White plays e2–e4, for example, the target is e3.
That target can appear even when no opposing pawn is currently able to capture en passant. Some modern tools normalize the field differently, so two FEN strings can describe the same practical position while differing here. When interoperability matters, preserve the value produced by the source tool and test the destination software.
The target is available only for the immediately following move. It does not mean a piece occupies that square. Read the complete en-passant rule before editing this field manually.
Field 5: halfmove clock
The halfmove clock counts plies—moves by one player—since the last pawn move or capture. It resets to zero after either event and increases after other moves.
This field helps software evaluate move-count draw rules. It is not the number of moves shown on a physical chess clock, and it does not measure elapsed time. A value of 17 means 17 individual turns have occurred since the last pawn move or capture.
A FEN alone may still be insufficient to prove every repetition claim because repetition depends on earlier occurrences of the same position. Keep the game record when historical context matters. See chess draw rules in practice for the distinction.
Field 6: fullmove number
The fullmove number starts at 1 and increases after Black completes a move. Therefore:
- Before White's first move, the value is
1. - After White's first move, it remains
1because Black is next. - After Black's first move, it becomes
2.
This field helps place the position within move notation. It does not determine which side moves; field 2 does that directly.
How to decode a FEN safely
Use a fixed process instead of trying to visualize the entire string at once:
- Split the text on spaces and confirm there are six fields.
- Split the board field on
/and confirm there are eight ranks. - Expand each digit and verify that every rank totals eight squares.
- Place the pieces from a8 to h8, then continue down to a1–h1.
- Apply the side-to-move field.
- Record castling rights and the en-passant target separately.
- Read the two counters and preserve them when exporting the position.
- Use a rules-aware validator to check basic syntax and position legality.
A syntactically valid string is not automatically a sensible or legally reachable chess position. It might contain a missing king, impossible checks, inconsistent rights, or another historical contradiction. A board viewer should validate more than the number of fields.
FEN versus PGN
FEN and PGN solve different problems:
- FEN is a snapshot. It describes one position plus the minimum state needed to continue from it.
- PGN is a game record. It stores headers, moves, results, comments, and optional variations.
A PGN can use SetUp and FEN tags when a game begins from a position other than the normal starting array. If you want someone to review how a position arose, share the PGN game record. If you want them to open one exact puzzle position, FEN is usually enough.
Common FEN errors
- Copying only the piece-placement field and omitting the other five fields.
- Reading ranks from White's side upward instead of rank 8 down to rank 1.
- Treating digits as empty-square labels rather than counts.
- Using
Pfor a black pawn or lowercase letters for White. - Assuming
KQkqmakes immediate castling legal. - Putting the pawn's destination rather than the passed-over square in the en-passant field.
- Resetting the fullmove number after White's move instead of incrementing it after Black's.
- Trusting a visually correct board without validating side to move and king legality.
Practice exercise
Start with the initial FEN and make 1.e4. Before checking a board editor, predict every field:
- The white pawn moves from e2 to e4 in the board field.
- Black becomes the side to move.
- All four castling rights remain.
- The specification's en-passant target is e3.
- The halfmove clock is zero because a pawn moved.
- The fullmove number remains one until Black moves.
Then make a quiet black knight move and identify which fields change. Repeating this process for captures, rook moves, and pawn moves builds a practical understanding of position state.
Frequently asked questions
Does FEN include move history?
No. It includes limited state such as castling rights, an en-passant target, and counters, but not the complete sequence of earlier moves. Use PGN for game history.
Can two FEN strings show the same pieces?
Yes. The piece-placement field can match while side to move, castling rights, en-passant data, or counters differ. Those differences may change legal moves or draw claims.
Why does a FEN have numbers inside the board field?
Each number compresses a run of empty squares on one rank. It never represents a piece or coordinate.
Specification reference: Portable Game Notation Specification, section 16.1.
