A FEN that will not load is often wrong in one small place. A digit is off by one, a slash has gone missing or a later field no longer agrees with the pieces.
You will learn to test a string in a fixed order: first its shape, then whether the position it describes could exist. The main faults come with a broken example that shows you where to look.
Start from a string that works
The broken examples here are damaged copies of one good string, so you can compare them character by character.
Correct string
2r3k1/pp3ppp/8/8/8/2N5/PP3PPP/4R1K1 w - - 0 1
2r3k1/pp3ppp/8/8/8/2N5/PP3PPP/4R1K1 w - - 0 1Faults come in two kinds. A shape fault means that the text cannot be read as a board at all. A position fault means that the text reads cleanly but describes something the rules do not allow. Look for them in that order. If the fields are new to you, first read what each FEN field means.
Faults in the piece field
| Broken string, do not use | What is wrong | Repair |
|---|---|---|
| 2r3k1/pp3ppp/8/8/8/2N4/PP3PPP/4R1K1 w - - 0 1 | rank 3 adds up to 7 | change 2N4 to 2N5 |
| 2r3k1/pp3ppp/8/8/2N5/PP3PPP/4R1K1 w - - 0 1 | only seven ranks | restore the missing empty rank |
| 2r3k1/pp3ppp/8/8/44/2N5/PP3PPP/4R1K1 w - - 0 1 | two digits in a row | change 44 to 8 |
| 2r3k1/pp3ppp/8/8/8/2H5/PP3PPP/4R1K1 w - - 0 1 | H is not a piece letter | change H to N |
To find a bad rank, split the field at each slash and total every group, adding one for each piece letter and the stated number for each digit. Each group must come to eight. The first group is rank 8 and the last is rank 1, so the sixth group is rank 3.
A rank that is too short or too long points to a miscount. Look for a dropped piece or an empty-square digit that is off by one. A rank can also total eight and still be wrong, with a piece one square to the side; only a comparison with the board reveals that.
Count the groups as well as their contents. Seven groups can mean that one slash and its rank vanished together, which happens easily in a run of empty ranks. Nine points to an extra slash or a rank typed twice.
The only digits allowed are 1 to 8. A zero or a 9 breaks the field. So does a space inside it, because the space is read as the start of the next field. The piece letters are k, q, r, b, n and p, in either case.
Missing or badly formed fields
A full FEN has six fields. The next string is deliberately broken: the letter for the side to move has been lost.
Broken example: a field is missing
2r3k1/pp3ppp/8/8/8/2N5/PP3PPP/4R1K1 - - 0 1
- Five fields remain instead of six.
- The first hyphen now sits where w or b belongs.
- Put the w back after the piece field to repair it.
| Field | Accepted form |
|---|---|
| Side to move | w or b |
| Castling | letters from KQkq in that order, or a hyphen |
| En passant | a square on rank 3 or 6, or a hyphen |
| Halfmove clock | a whole number, 0 or higher |
| Move number | a whole number, 1 or higher |
Some programs are lenient: they fill in missing counters or tolerate letters out of order. Others refuse the string. Six fields in the standard form suit both kinds.
Stray text picked up while copying breaks a string as well. Watch for quotation marks around it, a label such as FEN: in front of it or a full stop after the last number. Copy only the six fields and the spaces between them.
Impossible positions: kings, pawns and check
A string can have a perfect shape and still describe a board that no game could produce. Strict tools reject it, and the Board builder warns you about impossible positions.
- Kings. Each side has exactly one, and the two kings can never stand on neighboring squares.
- Pawns on end ranks. No pawn can be on rank 1 or rank 8. Pawns start one rank in, move only forward and are replaced when they reach the far end.
- Too many units. A side cannot have more than eight pawns, or more than sixteen pieces and pawns in all.
- The wrong side in check. If White is to move, Black cannot be in check, since Black has just moved and may not leave the king attacked.
| Broken string, do not use | Why it is impossible |
|---|---|
| 2r3k1/pp3ppp/8/8/8/2K5/PP3PPP/4R1K1 w - - 0 1 | two white kings, because the knight was typed as K |
| 2r1P1k1/pp3ppp/8/8/8/2N5/PP3PPP/4R1K1 w - - 0 1 | a white pawn has been placed on rank 8 |
| 4R1k1/pp3ppp/8/8/8/2N5/PP3PPP/6K1 w - - 0 1 | Black is in check but it is White's turn |
The third fault can be nothing more than a wrong second field. Change w to b and the same pieces form a legal position: Black is to move, is in check and is in fact checkmated. The guide to checkmate and stalemate shows how to confirm that.
4R1k1/pp3ppp/8/8/8/2N5/PP3PPP/6K1 b - - 0 1Castling and en passant that do not match
The third and fourth fields make statements about the pieces, and a reader can test them against the board.
- A castling letter needs the king and that rook on their starting squares: e1 with h1 or a1 for White, e8 with h8 or a8 for Black.
- An en passant square must be empty, with the pawn that skipped it just beyond and the pawn's starting square empty too. It lies on rank 6 when White is to move and on rank 3 when Black is to move.
| Broken string, do not use | Why it does not match | Repair |
|---|---|---|
| 2r3k1/pp3ppp/8/8/8/2N5/PP3PPP/4R1K1 w K - 0 1 | White's king has left e1 and h1 holds no rook | replace K with a hyphen |
| 2r3k1/pp3ppp/8/8/8/2N5/PP3PPP/4R1K1 w - d6 0 1 | d5 holds no black pawn | replace d6 with a hyphen |
4k3/8/8/3pP3/8/8/8/4K3 w - d6 0 2r3k2r/8/8/8/8/8/8/R3K2R w KQkq - 0 1These two faults often appear after editing. If you move a king or a rook, remove the matching right. If you rearrange pawns, check that the en passant square still fits. The rules behind both are set out in castling, en passant and promotion.
Common mistakes and a repair routine
Test a rejected string in this order
- Count the fields: six, separated by spaces.
- Count the rank groups: eight.
- Total each group and look for two digits side by side.
- Find exactly one K and one k in the first field.
- Look for pawns in the first and last groups.
- Ask whose turn it is and who is in check.
- Compare castling letters and the en passant square with the pieces.
The usual causes are simple. Copying by hand drops a slash. Moving a letter without updating the digits changes a rank total. Changing the pieces without updating the later fields leaves old information behind.
Repair one fault at a time and test again, since a string can hold several. If it is badly damaged, rebuild it from the board with the rank by rank method. Passing these tests does not prove that a real game could reach the position. It only shows that the obvious contradictions are gone.
Common questions
Why does my FEN have a rank of the wrong length?
A group between two slashes does not add up to eight squares. Total the letters and digits group by group.
Can a FEN have two kings of one color?
No. Each side needs exactly one king, so such a position is impossible.
Why is my FEN rejected because of a check?
The side that is not to move cannot be in check. Look at the second field and at the pieces aimed at that king.
Will a FEN load without the last two numbers?
Some programs accept it and fill them in, while others refuse it. Writing both numbers is the safer choice.
Sources
- Portable Game Notation Specification and Implementation Guide. Coordinated by Steven J. Edwards. Standard algebraic notation (section 8.2.3) and the FEN position format (section 16.1). Consulted on 25 November 2026.
- FIDE Laws of Chess taking effect from 1 January 2023. International Chess Federation (FIDE) Handbook. Rules of movement (Article 3), end of the game (Article 5), recording moves (Article 8), drawn positions (Article 9) and algebraic notation (Appendix C). Consulted on 25 November 2026.