Chess PGN Translator › Fix Lichess PGN parse error
Fix Lichess PGN Parse Error
If Lichess refuses your file with "Error parsing PGN", the moves are almost always fine —
something around them is not. The usual culprits are null moves (--, Z0),
commentary that is not wrapped in braces, evaluation symbols glued to a move such as Qxc6++-,
an unbalanced { or (, or a header tag containing an unescaped quote.
Paste the file into Chess PGN Translator, run Fix for Lichess, and re-import the result.
Look up your exact error message
Different tools word the failure differently. Lichess reports its own message; if you validated the file elsewhere you may have seen a message from the underlying PGN parser instead. Both are listed here.
| Error message | What is actually wrong | Fixed automatically? |
|---|---|---|
Error parsing PGN: expected: at line N, column N |
Frequently a header tag with no space between name and value, such as [PlyCount"29"]. The column number points at the quote. |
Yes |
Expected "]" or whitespace |
An unescaped double quote inside a tag value, e.g. [White "The "Question""] or [White ""Materialization" of a Rank"]. |
Yes |
Expected "\"" or whitespace but "2" found |
A header tag whose value runs across several lines, e.g. an Event name with a line break before 2...e5. |
Yes |
Expected [1-8] but "n" found |
Comment text leaking into move parsing, usually after an unbalanced brace earlier in the file. | Yes |
Expected … but "," found |
Prose punctuation left in the movetext outside a comment, e.g. 2. b3, {comment} or b5. {comment}. |
Yes |
Expected … but ")" found |
A NAG glued to a variation closer, such as Rxg3 $11), or a variation that contains only a comment. |
Yes |
end of input expected / Cannot parse moves |
The file is truncated, or the last game ends on a bare move number such as 76. with no move after it. |
Yes |
Import fails on a null move, or but "@" found |
A --, Z0, @@ or 0000 placeholder move. Lichess has no notation for "this side does nothing", and strict parsers reject @@ and 0000 outright. |
Yes, converted to a comment |
ERR_KINGS |
The FEN tag describes a position without exactly one king per side. This is an illegal position, not a syntax error. | No — fix or remove the FEN tag |
Malformed PGN this tool repairs
Each of these comes from a real course or database export that Lichess rejected:
- Null moves —
--andZ0become a comment so the line survives the import. - Attached evaluation glyphs —
Qxc6++-,Qxg2+-+,Ng4++-are split into a check plus a proper NAG (Qxc6+ $18). - Unbraced commentary in the movetext —
6.Bg5! we are missing a resourceis wrapped into a real comment instead of being parsed as moves. - Orphan closing braces — stray
}in the movetext, e.g.2. c3 } Nf6. - Nested braces inside comments — PGN comments cannot nest, so inner braces are converted to parentheses.
- Missing black move numbers after a comment —
}Qf1+!?becomes} 35...Qf1+!?. - Comments between sibling variations — moved inside the variation where the parser expects them.
- Prose at the start of a variation —
(An alternative is 8.Be3becomes({An alternative is} 8.Be3. - NAGs in the wrong place —
Nxc6 {comment} $4becomesNxc6 $4 {comment};$11)gets a separating space. - Broken header tags — missing space, multi-line values, and unescaped quotes inside a value.
- Dangling move number at the end —
75...Kd3 76.is closed off properly.
A game that still cannot be repaired is kept in the output exactly as it was and reported in a downloadable failure log with its game number, Event name and players, so one bad game never costs you the rest of the file.
Fix my PGNHow to fix it, step by step
- Open Chess PGN Translator.
- Paste the PGN text, or upload the
.pgnfile. - Choose Fix for Lichess. This parses and rebuilds the file with no translation, so it is unlimited and uses no AI quota.
- If the file contains null moves, also enable Convert null moves.
- Download the cleaned PGN and import it into your Lichess study again.
Large collections can also be split into 64-game parts, which is the size Lichess studies accept per chapter batch.
What this cannot fix
ERR_KINGSand other illegal positions. A FEN without exactly one king per side is rejected on chess grounds, not syntax. Correct the FEN tag.- Genuinely illegal moves. If a move cannot be played in the position, no amount of syntax repair will help.
Frequently asked questions
Why does Lichess reject a file that ChessBase or Chessable opens fine?
Those programs are forgiving and repair quietly as they read. Lichess uses a strict parser and stops at the first token it cannot account for. The file was never fully valid PGN; it just had a lenient reader.
Will my moves, variations or comments change?
No. Move notation is written back exactly as it appeared, along with variations, NAGs and PGN tags. Only the malformed syntax around the moves is repaired.
Is there a file size or game limit?
The repair operations are unlimited — the beta character cap applies only to AI comment translation. Multi-megabyte course files with hundreds of games are handled in one pass.
Do I need an account?
No. Paste a PGN and run the repair.
Related guides
Lichess null move PGN fixer — --, Z0, @@ and 0000 explained.
Online PGN parse error fixer — clean, split and repair PGN files without translation.
Last updated 10 September 2026.