PGN export format

Also known as: export PGN

The strict, canonical PGN profile for generating exchangeable and archival games with predictable text formatting.

This page is temporarily shown in English. Complete localization will be added in a later stage.

Explanation

PGN means Portable Game Notation, a text format for recording games. It defines two profiles for the same data. The export format is the strict profile a program should produce when writing a game for exchange or archival storage. Its purpose is to make conforming programs generate equivalent representations instead of many variations in spacing and order.

The opening section places each left-justified on its own line. The seven mandatory tags come first in their fixed order, followed by additional tags sorted by name. A blank line separates this section from the .

Moves use SAN, Standard Algebraic Notation, in a canonical form such as Nf3 for a knight moving to f3. Move numbers, spaces, and line breaks follow specific rules. Movetext lines contain fewer than 80 printing characters, and a final marker states 1-0, 0-1, 1/2-1/2, or an unknown result. That marker must match the Result tag.

The profile also forbids tab characters and specifies LF, meaning line feed, as the archival newline character. These requirements describe how the text is physically written into the file, not the most attractive way to display a game on screen.

Common confusions

Export format versus any saved PGN

A file may be readable as PGN without satisfying every canonical export rule. Conformance requires the specified ordering, spacing, and layout.

Export versus import

Export defines strict writing. Import defines how much variation a reader may tolerate when receiving text.

View term

Related terms

© 2026 MindZug