PGN — Portable Game Notation — is the standard plain-text file format for recording chess games: the moves in algebraic notation, plus a block of headers identifying who played, where, when, and what the result was. One .pgn file can hold a single game or a database of millions, and every serious chess program, website, and engine in the world can read it. If chess has a universal language for games — not positions, but entire played games with their stories attached — PGN is that language, and learning to read it fluently is one of the quietest high-value skills in a player's education.
What Is PGN?
PGN was designed in the early 1990s by Steven J. Edwards, at the moment personal computers were becoming part of every chess player's life. Before it, each program stored games in its own private format, and moving your analysis from one tool to another meant retyping moves by hand. PGN solved this with a radical choice: plain text, readable by both humans and machines. Open a .pgn file in any text editor and you can simply read the game — no software required.
Here is a complete, legal PGN game, so you can see the whole shape at once:
[Event "Casual Game"]
[Site "Santiago, Chile"]
[Date "2026.08.03"]
[Round "1"]
[White "Flores Rios, Mauricio"]
[Black "Student"]
[Result "1-0"]
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7
6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7 1-0
Two parts, always in this order: a header section of tag pairs in square brackets, then the movetext — the moves themselves, ending with the result. That is the entire format. Everything else (comments, variations, evaluation codes) is optional decoration layered on top of this skeleton.
The word "portable" in the name is the point. A game you record today will open in software written thirty years from now, because the format is text and the specification is public. When I hand a student a file of my own games from the 2000s, they load instantly into any modern tool — that permanence is something almost no other data format of that era achieved.
The Header Tags: A Game's Passport
The bracketed lines at the top are tag pairs: a tag name and a value in quotes. The standard defines a mandatory core known as the Seven Tag Roster, in this exact order:
- Event — the tournament or match name ("FIDE World Championship", "Casual Game").
- Site — where it was played, traditionally "City, Region COUNTRY"; online games use the site name.
- Date — in
YYYY.MM.DDformat, with??for unknown parts ("1857.??.??"). - Round — the round within the event.
- White and Black — player names, conventionally "Lastname, Firstname".
- Result —
1-0,0-1,1/2-1/2, or*for an unfinished/unknown result.
Beyond the seven, optional tags carry whatever else matters: WhiteElo and BlackElo for player ratings, ECO for the opening classification code, TimeControl for the time control, Termination for how the game ended. Two optional tags deserve special mention because they change how the movetext is interpreted: FEN (with SetUp "1") tells the reader the game starts from a specified position rather than the initial array — this is how puzzle collections and Chess960 games are stored — and Variant names a non-standard rule set.
A practical habit from my coaching work: when you save your own games, fill in the headers honestly, especially date, opponent, and time control. Three years later, "who was this and was it blitz?" is a question you will not be able to answer, and a database of anonymous games loses half its training value.
The Movetext: How Moves Are Written
The moves use standard short algebraic notation: Nf3 (knight to f3), exd5 (pawn on the e-file captures on d5), O-O and O-O-O for castling short and long, e8=Q for pawn promotion, with + for check and # for checkmate. Move numbers precede White's moves ("1. e4 e5 2. Nf3"), and the movetext ends by repeating the result token.
Three details trip up newcomers:
Disambiguation. When two identical pieces can reach the same square, PGN adds the file or rank of origin: Nbd7 means the knight from the b-file goes to d7; R1e2 means the rook from the first rank. The format uses the minimum needed, nothing more.
Black-to-move continuation. When movetext resumes with Black's move — after a comment or variation — you will see 10... Nbd7, with three dots replacing White's half of the move pair.
En passant is written as a normal capture. The special pawn capture en passant appears simply as exd6 — the destination is the square the capturing pawn lands on, not the square the captured pawn stood on. Some sources append "e.p.", but the standard does not require it.
Line breaks and spacing are free — the movetext can be one long line or wrapped at 80 characters; readers ignore the whitespace. That flexibility is why hand-edited files almost always still load correctly.
Comments, Variations, and Evaluation Codes
A bare game score tells you what happened; an annotated PGN tells you why. The format has three tools for this, and they nest freely:
1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6
{The Najdorf. Black keeps b5 and ...e5 flexible.}
6. Be3 (6. Bg5 e6 7. f4 {is the sharpest try}) 6... e5
7. Nb3 Be6 $14 *
Comments live inside curly braces {...} and can contain any prose. Variations live inside parentheses (...) — an alternative to the move just played — and can nest to any depth, which is how a single PGN file stores an entire analysis tree, the same structure an opening repertoire uses. Numeric Annotation Glyphs (NAGs) are codes like $1, $2, $14: standardized numbers that programs render as the familiar evaluation marks ("good move", "White is slightly better"). Software writes NAGs so that a file annotated in one program displays identically in another.
When you study a deeply annotated game — say, a collection of brilliancies — you are reading exactly this structure: main line, branching alternatives, and prose explaining the ideas. My advice is to play through the main line first without the variations, form your own opinions, and only then open the branches. Reading annotations passively teaches far less than arguing with them.
Reading a PGN Like a Trained Player
Here is the reading routine I give students, because "I have the file" and "I extracted the lesson" are very different things.
First, read the headers: who is the stronger player, what year, what time control? A 1912 masterpiece and a 2026 online blitz game deserve different levels of trust — older games are instructive precisely because plans were carried out fully, while a bullet game may contain a blunder every five moves.
Second, set up a real or digital board and play the moves out. Do not just scan the text. The skill of converting 24. Rxd6 into a picture in your head is pure visualization, and it grows only with use — but while you are building it, use a board.
Third, pause at every capture, every check, and every move that surprises you, and ask what you would have played. This converts a game score into a private lesson. Our guide on how to analyze your chess games builds a full method on top of this habit.
Finally, notice where the game left "the book." Databases make it easy to see which moves were known theory — a book move — and where somebody played a novelty. That boundary is where the real fight began, and it is also where you should focus your opening study. Watch, too, for move orders: two games may reach the same position through different sequences, a transposition, and PGN records the path, not just the destination — which is exactly why the format stores games rather than positions.
Exporting and Importing: Moving Games Between Tools
Every major chess platform exports PGN. After an online game, look for "Download", "Share", or an export icon — you will receive either a .pgn file or the raw text to copy. Databases and desktop programs export single games or entire collections the same way; a database of a million games is still just one large text file.
Importing is the mirror image: chess software offers "Open PGN", "Import game", or a paste box that accepts the raw text. Because the format is plain text, you can also transport games in ways no proprietary format allows — paste a game into an email, a chat message, or a forum post, and the recipient pastes it back into their own tool. When I exchange analysis with colleagues, we send PGN text in a message; it is instantaneous and nothing is lost.
Three practical notes from years of file-wrangling. One: a multi-game file is just games concatenated — each new [Event ...] tag starts the next game, so you can merge files by literally pasting one after another. Two: if an import fails, the culprit is almost always an illegal move earlier in the score (often a wrong disambiguation) or a missing result token at the end; read the error line number and check the movetext there. Three: keep one master file of your own serious games, appended after every event. That single habit — every strong player I know does it — gives you a lifetime training database for free, and it is the raw material for every serious review method you will ever use.
PGN and Your Improvement at ChessMind AI
PGN is the doorway into every game-based tool we have built. The game analysis board accepts pasted PGN, so any game you played anywhere — online, over the board, from a book — can be stepped through with engine evaluation and a review of the critical moments; it is the natural next step after exporting a game from wherever you played it. If your game exists only on paper or on a physical board, the board scanner closes the gap between the physical and digital worlds so you can analyze it like any other game. Openings are where PGN's tree structure shines: our opening courses are, underneath, exactly the annotated variation trees described above, presented interactively, and the opening trainer drills those lines until you can reproduce them from memory rather than from the file. For studying complete games efficiently, the miniatures collection serves short decisive games — each one a PGN you can absorb in five minutes — and daily puzzles train the tactical alertness you need at the "pause at every capture" step of the reading routine.
Frequently Asked Questions
What does PGN stand for?
Portable Game Notation. "Portable" because it is plain text that any chess program on any system can read, "Game" because it records complete games rather than single positions, and "Notation" because the moves are written in standard algebraic notation.
How is PGN different from FEN?
They answer different questions. PGN records an entire game — headers, every move from start to finish, optionally with comments and variations. FEN encodes a single position at one moment, with no history. A PGN file may contain a FEN tag when a game starts from a non-standard position, which is how the two formats cooperate.
Can I write a PGN file by hand?
Yes, and it is good practice. Type the seven standard header lines, then the moves in algebraic notation with move numbers, and finish with the result token. Any text editor works because the format is plain text. The most common beginner errors are forgetting the final result and mis-disambiguating when two knights or rooks can reach the same square.
Why won't my PGN file import?
Almost always one of three things: an illegal or ambiguous move somewhere in the score, a missing result token at the end of the movetext, or stray characters from copy-pasting (smart quotes in the headers are a classic). Import errors usually report a line number — go there and check the move against the position on a board.
Can one PGN file contain many games?
Yes. A multi-game file is simply games placed one after another; each new bracketed header block starts the next game. This is how entire databases with millions of games are distributed as a single text file, and why you can merge collections by concatenating files.
