ChessmateGet the app

PGN

Portable Game Notation

PGN is a text format for storing a chess game, including moves and optional metadata or comments.

A PGN can record player names, event data, results, move text, variations, and annotations. It may contain one game or a collection of games.

A PGN game has tags and movetext

Tag pairs store information such as the event, players, date, and result. Movetext then records the game in SAN with move numbers and a final result marker.

For archival export, the PGN specification defines seven standard tags in order: Event, Site, Date, Round, White, Black, and Result. The Result tag and the marker at the end of movetext should agree.

[Event "Casual Game"][Site "?"][Date "2026.07.11"][Round "?"][White "White player"][Black "Black player"][Result "0-1"]1. f3 e5 2. g4 Qh4# 0-1

PGN can preserve analysis around the main game

Brace comments store prose, while recursive annotation variations store alternate move sequences in parentheses. Numeric annotation glyphs can encode standardized move or position assessments.

{Develops the knight}
A brace comment attached to the movetext.
(2... Nf6)
An alternate continuation stored as a variation.

PGN and FEN answer different questions

PGN explains how a game progressed. FEN describes one position without preserving the full path that reached it. A PGN may include a FEN tag when a game starts from a non-standard position.