If you have ever copied a position into an engine or shared a puzzle online, you have probably met a strange-looking string like rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1. That is FEN, and it is one of the most useful tools in chess. Where PGN records a whole game move by move, FEN does something different: it captures a single position completely, in one line of text, so anyone or any program can recreate it exactly.
FEN stands for Forsyth-Edwards Notation, named after journalist David Forsyth, who devised the original system in the 19th century, and Steven Edwards, who extended it for computer use. It is the standard everywhere today.
The Six Fields of a FEN String
A FEN string is a single line made of six fields separated by spaces. Each field answers one question about the position. Here is the standard starting position:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
Reading left to right, the six fields are these:
| # | Field | Example | What it describes |
|---|---|---|---|
| 1 | Piece placement | rnbqkbnr/.../RNBQKBNR |
Where every piece sits, rank 8 down to rank 1 |
| 2 | Active color | w |
Whose turn it is: w (White) or b (Black) |
| 3 | Castling availability | KQkq |
Which castling rights remain, or - if none |
| 4 | En passant target | - |
The square a pawn can be captured en passant, or - |
| 5 | Halfmove clock | 0 |
Half-moves since the last capture or pawn move |
| 6 | Fullmove number | 1 |
The move number, starting at 1 |
Let us walk through each one.
1. Piece placement
This is the longest and most important field. It describes the board one rank at a time, starting from rank 8 (Black's back rank) and ending at rank 1 (White's back rank), with a forward slash / between ranks.
Within each rank, pieces are written using letters. Uppercase = White (K king, Q queen, R rook, B bishop, N knight, P pawn) and lowercase = Black (k, q, r, b, n, p).
A digit stands for that many consecutive empty squares. So 8 means a completely empty rank, and 4P3 means four empty squares, a white pawn, then three more empty squares. Each rank must add up to exactly eight squares.
In the starting position, the top rank rnbqkbnr is Black's pieces, the next rank pppppppp is Black's pawns, the four 8s are the empty middle ranks, then PPPPPPPP and RNBQKBNR are White's pawns and pieces.
2. Active color
A single letter telling you whose move it is: w for White, b for Black. This matters: the same arrangement of pieces is a different position depending on who is to move, and engines evaluate it differently.
3. Castling availability
This field lists which castling rights still exist, using the same letter scheme:
K= White can castle kingside,Q= White can castle queensidek= Black can castle kingside,q= Black can castle queenside
KQkq means all four rights are intact. If a king or the relevant rook has moved, the matching letter disappears. When no side can castle at all, the field is just a hyphen: -.
4. En passant target square
If the last move was a pawn advancing two squares, this field names the square behind that pawn, where an enemy pawn could capture it en passant. If there is no such possibility, it is -. We will see a real example in a moment.
5. Halfmove clock
This counts half-moves (single moves by either side) since the last pawn move or capture, to enforce the fifty-move rule: at 100 half-moves a draw can be claimed. It resets to 0 whenever a pawn moves or a piece is captured.
6. Fullmove number
The current move number. It starts at 1 and increments each time Black completes a move, so after both sides have played once it becomes 2.
A Second Example: After 1.e4
Notation makes more sense when it changes. Here is the position right after White plays 1.e4:
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1
Compare it to the starting FEN and notice what moved:
- Piece placement: rank 4 is now
4P3(the pawn that advanced two squares), and White's pawn rank is nowPPPP1PPP(a gap where the e-pawn was). - Active color flipped from
wtob. - En passant target changed from
-toe3, the square the e-pawn skipped over. - The halfmove clock is
0because a pawn just moved, and the fullmove number is still1since Black has not yet moved.
That single line of text is enough for any board, app, or engine to rebuild the position perfectly.
Where FEN Is Actually Used
FEN shows up anywhere a single position needs to travel:
- Sharing a position. Pasting a FEN into a chat or forum lets someone load the exact spot you are looking at, no diagram needed.
- Chess puzzles. Tactics trainers store each puzzle as a FEN plus the solution, so the engine knows the setup and whose move it is.
- Engines and analysis. Stockfish, Lichess, and desktop GUIs all accept FEN to set up a position instantly instead of replaying moves from the start.
- Setting up the board. Studying an endgame from a book? Paste the FEN and the position appears, ready to explore.
FEN also pairs naturally with PGN: a PGN file can embed a FEN tag to start a game from a custom position rather than the opening setup. And because FEN and SAN describe the same game from different angles, it helps to be comfortable with algebraic notation too.
From a Board Photo to a FEN String
Writing FEN by hand is error-prone. Miscount one rank or forget that placement runs from rank 8 to rank 1, and the whole string becomes invalid. The good news is you rarely need to type it yourself.
ScanChess can generate a FEN directly from a photo of a chessboard. Snap a picture of a position from a book or a game in progress, and the board recognition tool reads the pieces square by square and outputs a clean, ready-to-use FEN string. Paste it into your favorite engine or analysis board and you are studying in seconds. The same recognition powers our chess board to FEN workflow, while our broader tools also digitize full games from handwritten scoresheets into PGN.
Quick Recap
FEN is a compact, complete snapshot of one chess position, written as six space-separated fields: piece placement (rank 8 to rank 1), active color, castling rights, en passant target, halfmove clock, and fullmove number. Learn the order once and you can read almost any FEN at a glance.
Have a position you want to analyze? Take a photo and turn it into a FEN in seconds.