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 messageWhat is actually wrongFixed 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:

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 PGN

How to fix it, step by step

  1. Open Chess PGN Translator.
  2. Paste the PGN text, or upload the .pgn file.
  3. Choose Fix for Lichess. This parses and rebuilds the file with no translation, so it is unlimited and uses no AI quota.
  4. If the file contains null moves, also enable Convert null moves.
  5. 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

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.