If you have ever downloaded a chess game, exported one from an app, or been handed a .pgn file by a coach, you have met Portable Game Notation. PGN is the lingua franca of digital chess: a plain-text format that stores everything about a game, from who played it to the final move, in a way that almost every chess program on earth can read. This article explains what PGN actually contains, why it became the universal standard, and how to open or import one.
What PGN Stands For
PGN is short for Portable Game Notation. It was designed in the early 1990s to give the chess world a single, human-readable, machine-readable way to record games. The keyword is portable: a PGN file is just text, so it survives being emailed, pasted into a forum, or opened in any text editor. There is no proprietary binary blob and no app lock-in. Open a .pgn file in Notepad or TextEdit and you can read the whole game with your own eyes.
A PGN file can hold a single game or thousands of games stacked one after another. Each game has two parts: a block of tags at the top and the movetext below it.
The Anatomy of a PGN File
Here is a complete, correctly formatted PGN for a short game:
[Event "Casual Game"]
[Site "London ENG"]
[Date "1851.06.21"]
[Round "?"]
[White "Adolf Anderssen"]
[Black "Lionel Kieseritzky"]
[Result "1-0"]
1. e4 e5 2. f4 exf4 3. Bc4 Qh4+ 4. Kf1 b5 5. Bxb5 Nf6 6. Nf3 Qh6
7. d3 Nh5 8. Nh4 Qg5 9. Nf5 c6 10. g4 Nf6 11. Rg1 cxb5 12. h4 Qg6
13. h5 Qg5 14. Qf3 Ng8 15. Bxf4 Qf6 16. Nc3 Bc5 17. Nd5 Qxb2
18. Bd6 Bxg1 19. e5 Qxa1+ 20. Ke2 Na6 21. Nxg7+ Kd8 22. Qf6+ Nxf6
23. Be7# 1-0
That is the opening flourish of the "Immortal Game." Notice the two distinct sections.
The Seven Tag Roster
The bracketed lines at the top are tags, each a name-and-value pair. Seven of them are mandatory and always appear in the same order. This required set is called the Seven Tag Roster:
- Event — the name of the tournament or match (here, a casual game).
- Site — where it was played, often a city and country code.
- Date — the start date in
YYYY.MM.DDform, with?for unknown digits. - Round — the round number within the event.
- White — the player with the white pieces, written
Last, Firstor as a full name. - Black — the player with the black pieces.
- Result — the outcome:
1-0(White won),0-1(Black won),1/2-1/2(draw), or*(unfinished).
Beyond the mandatory seven, PGN allows optional tags such as ECO (opening code), WhiteElo, BlackElo, TimeControl, and FEN (more on that below). Programs ignore tags they do not understand, which is part of why the format has aged so gracefully.
The Movetext
Below the blank line comes the movetext: the moves themselves in standard algebraic notation (SAN), numbered in pairs. 1. e4 e5 means move one was White's pawn to e4 and Black's pawn to e5. Captures use x, check uses +, checkmate uses #, and castling is O-O or O-O-O. If SAN is unfamiliar, our chess notation explained article walks through every symbol.
The movetext can also carry annotations: comments in { curly braces }, variations in ( parentheses ), and numeric glyphs like $1 for a good move. The game always closes by repeating the result, which is why 1-0 appears both in the tag and at the very end of the moves.
Why PGN Became the Universal Format
Several formats have come and gone, but PGN won for a few practical reasons. It is plain text, so it is readable without special software and trivial to generate. It is self-describing, because the tags label every piece of metadata. It is extensible, since new optional tags do not break old readers. And it was published as an open specification rather than tied to one vendor.
The result is near-total interoperability. You will encounter PGN everywhere:
- Lichess and Chess.com let you export any game as PGN and import PGN to analyze, study, or share.
- ChessBase and the free SCID (and its fork SCID vs. PC) use PGN as a primary import and export format for their game databases.
- Engines, opening-tree builders, and tactics trainers almost universally read PGN as input.
Because every serious tool speaks PGN, it has become the safe, future-proof way to keep your games. Export to PGN and you are never locked into a single platform.
How to Open or Import a .pgn File
A PGN file is just text, so you can view one in any text editor. But to play through the game on a board, use a chess tool:
- On Lichess: open the Analysis board, then paste the PGN or upload the file. Lichess builds an interactive board you can step through.
- On Chess.com: use the Analysis tool, choose to import a game, then paste the movetext or upload the
.pgn. - In a desktop database like SCID or ChessBase: use File → Open or Import, which is ideal for large multi-game collections.
If a paste fails, the usual culprit is a malformed tag or an illegal move in the movetext. For a deeper look at moving games into this format, see convert handwritten scoresheet to PGN and our scoresheet-to-PGN solution.
PGN and FEN: Games Versus Positions
PGN records an entire game from the starting position forward. Its counterpart, FEN (Forsyth-Edwards Notation), records a single board position as one line of text: piece placement, whose turn it is, castling rights, and more. Think of PGN as the full movie and FEN as one freeze-frame. The two work together, and a PGN can even include a [FEN "..."] tag to declare a custom starting position, which is how puzzles and studies that do not begin from the standard setup are stored.
Turn a Scoresheet Into PGN Instantly
Knowing what PGN is is one thing; producing it from a handwritten scoresheet by typing move after move is slow and error-prone. ScanChess.com handles it for you. Snap a photo of your paper scoresheet and the AI reads your handwriting, converts it to clean algebraic notation, checks that every move is legal, flags anything suspicious, and gives you a downloadable .pgn with an interactive replay you can import straight into Lichess or Chess.com. Try it on the board recognition scanner and turn your handwritten game into a portable PGN in seconds.