I have a pgn file containing a game. I want to add a comment into the game (like at move 23. - This is a ok move etc.) using words and not symbols. Is it possible to do this?

2 Answers 2

[Date "1910.01.07"]
[Result "1/2-1/2"]
[White "Carl Schlechter"]
[Black "Emanuel Lasker"]

1. e4 {Notes by J. R. Capablanca} e5 {This is Black's second move!} 2. Nf3 Nc6 3. Bb5 Nf6 *

This is a sample PGN game. You'll just need { and } to enclose your comments. But you should use a chess program to do it for you. SCID is free and can do it for you.

  • 6
    Why would you need a dedicated chess program if they are standard ASCII text files with a recommended maximum line length of 80? Sounds like any text editor can do the trick.
    – user4378
    Commented Dec 15, 2016 at 15:54

Yes, there are two ways to add a text comment to a pgn file.

The first is far more common: simply wrap the comment in {braces}

1. e4 {Best by test!} e5

The second is less common, but also a part of the official pgn spec1. An end of line comment is allowed if it is preceded by a semicolon

1. e4; Best by test!
1... e5

This is far more awkward to read (since there is an extra move number in the file) and not all software supports this.

As an aside, all major annotating software (chessbase, chess.com, lichess.org, SCID) defaults to using the first scheme.

1: The pgn spec file can be found either at https://www.chessclub.com/user/help/PGN-spec or http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm

  • It's important to note very few softwares support the second format. It's like it's not part of the specification.
    – SmallChess
    Commented Oct 12, 2016 at 4:41
  • 1
    Unfortunately, many programs just take the standard as a "recommendation". Having written several PGN readers, it's sometimes quite amusing to see what's thrown at you. BTW, the semicolon style comment can be useful when } is part of the comment; I agree, though, it's hardly supported, and common software tends to break.
    – Eiko
    Commented Oct 12, 2016 at 8:59
  • Why would the presence of a ;-to-line-end comment before a black move entail putting a move number and 3 dots in between? This is not true of Lucas Chess.
    – Rosie F
    Commented Nov 2, 2021 at 12:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.