PGN files and how to use them

Portable Game Notation (PGN) is a plain text format for recording chess games (both the moves, and the game info). Many chess programs recognize this format, as it is the de facto standard for chess data exchange. PGN became extremely popular due to its accessibility by ordinary text editors, including word processors capable of importing and exporting plain text. (*)


1. PGN syntax

PGN code begins with a set of "tag pairs" (a tag name and its value enclosed by "[ ]"), followed by the "movetext" (chess moves with the optional commentary enclosed by "{ }"). Tags contain basic information about the game - player names, date and place the game was played, game result, sometimes also player ratings, opening classification, or player nationality.

One PGN file can contain many games, separated by the empty line (therefore in case of manual PGN editing it is important to avoid accidental creation of empty line within move text of some game).

Example from this game:


[Event "2004 Standard Chess Dropout Tournament, Round 5"] [Site ""] [Date "2005.03.08"] [Round "5"] [White "dmichael"] [Black "Stephen"] [Result "1-0"] [ECO "A11"] [WhiteCountry "USA"] [BlackCountry "ENG"] 1. c4 Nf6 { Good luck in this one too! } { STEPHEN - Holiday, clock paused for 7 days: Need a few days off chess to prepare for an OTB congress at the weekend. I may make the odd move during the week, but normal service will be resumed next week! } 2. g3 c6 3. Bg2 d5 4. Nf3 Bf5 5. cxd5 cxd5 6. Qb3 { MICHAEL, DENNIS O. - Holiday, clock paused for 7 days } 6... Qc8 7. Nc3 e6 8. d3 Nbd7 9. O-O Be7 10. Bg5 O-O 11. e4 dxe4 12. dxe4 Nc5 13. Qa3 Bg6 14. e5 Nd5 15. Nxd5 Bxg5 16. Nxg5 exd5 17. Rac1 b6 18. Bxd5 Rb8 19. f4 Qd7 20. Rcd1 Qe7 21. e6 f6 22. f5 Bh5 23. Nf3 Rfd8 24. b4 { I'm afraid that this game appears to be going from bad to worse and so I resign. Well played! } 1-0


2. Using PGN files

You can use a PGN file to import your games into a games database, analyse them with a chess engine, send them to a friend, etc. Almost any existing chess program is able to import and export PGN files. See below for some recommendations.

To download the PGN file of a SchemingMind game, you should click the

under the board. You can also download many games at once, for instance on the Completed Games page there is a link to download all the games listed on the page in one PGN file.


3. PGN for variant games

PGN can be used also for the variant games. In such cases:

  • additional tag Variant is added,

if the game applies random initial setup concept, there are two extra tags SetUp (which just marks that there is custom setup used) and FEN (describing initial position).

Note: FEN tag can be also used for standard chess, to setup initial position of chess problems, incomplete games, etc

For example, here is the PGN of this Chess960 game:


[Event "Chess960: 2005 Fischer Random Dropout Tournament, Round 6"] [Site ""] [Date "2006.08.21"] [Round "6"] [White "gvhill"] [Black "saxon"] [Result "1/2-1/2"] [Variant "fischerandom"] [SetUp "1"] [FEN "rbbkqnnr/pppppppp/8/8/8/8/PPPPPPPP/RBBKQNNR w KQkq - 0 1"] [WhiteCountry "USA"] [BlackCountry "GER"] 1. d4 { Congratulations on making the final round!  It's a pleasure to play you again. } 1... d5 2. Nf3 Nf6 3. Ne3 Ne6 4. c4 dxc4 5. Nxc4 c5 6. dxc5 Qd7+ 7. Qd2 Nxc5 8. Qxd7+ Bxd7 9. O-O O-O 10. Rd1 { I think we have a draw from here.  What do you think? } { looks like a very drawish position. After another 10 move we will end in an equal endgame. Not much excitment here.... } 1/2-1/2

You are likely to face problems while trying to open PGN of variant games in chess programs. While more and more programs are able to handle Chess960, only a few understands CrazyHouse, and no one is likely to handle more exotic variants. Fortunately, in most cases, variant games should be just ignored, and the remaining games present in PGN file imported correctly.


4. Special features of SchemingMind PGN files

The Date tag contains the date when the game started (in sync with recommended practice for correspondence games).

The Site tag always contains the same text - (it can be useful, if you want to filter for SchemingMind games in the database contaning also other games).

Here is the list of values Variant tag can have.


5. Recommended tools

While PGN files may be open in almost any chess related program, it is usually recommended to use some chess database. Such applications not only let you replay the game, but also support building game databases (where you can gather games from different sources, search them according to different criteria, etc), annotating and analysing the games, referencing opening books - and more. Most popular applications of this kind:

ChessBase (most popular, also among professional players, but expensive, have also truncated down version called ChessBase Light)

ChessAssistant (main competitor of ChessBase, cheaper and faster, but a bit less polished)

Scid (freely available and fairly sophisticated application, worth trying)

Jose (another freely available application, a bit unstable but the only one which handles Chess960 perfectly).

If you do not have any of those applications, you can also use almost anything chess-related to replay and/or analyse the game, be it playing program (like Fritz or Shredder), or online chess site client (for example BabasChess or Dasher)

Finally, you can try an online PGN viewer.

(*): Text partially based on this article of Wikipedia.

Terms and Conditions | Privacy Policy | Copyright © 2002 - 2021 | Westhoughton | Bolton | England