When you want to pass chess games and positions between apps or keep them in a file, two formats are used: PGN and FEN. Both are written in ordinary text.
- PGN (Portable Game Notation): A format that writes out the whole sequence of a game.
- FEN (Forsyth–Edwards Notation): A format that writes a single position at one moment on a single line.
PGN: Writing a Game
PGN has two parts: “tags” that hold information about the game, and a section that holds the moves.
[Event "Weekend Game"]
[Site "?"]
[Date "2026.11.18"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 * - Tags: A name and a value inside square brackets. The seven basic ones are the event (Event), place (Site), date (Date), round (Round), White, Black, and the result (Result). Anything unknown is written as “?”.
- Moves: Listed with move numbers and the style like Nf3 (algebraic notation). The style is covered in How to Read Chess Notation.
- Result: At the end, one of 1-0 (White wins), 0-1 (Black wins), 1/2-1/2 (draw), or * (not finished) is written.
Within the moves you can also write comments inside curly braces, and “variations” that try other moves.
FEN: Writing a Position
FEN writes one position in six fields separated by spaces. The starting position looks like this.
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 - Piece placement: From the 8th rank down to the 1st, with ranks separated by “/”. White pieces are uppercase (K Q R B N P), black pieces are lowercase, and a number is the count of empty squares in a row.
- Side to move: w if it is White’s turn, b if Black’s.
- Castling: The castling rights that still remain. K for White kingside, Q for White queenside, k and q for Black. If there are none, “-”.
- En passant: When a pawn has just moved two squares, the square it passed over. If not, “-”.
- Halfmove clock: How many moves have been played since the last pawn move or capture (used for the 50-move rule).
- Move number: The number of the next move. It goes up by one each time Black moves.
Example: After 1. e4
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1 The 4th rank becomes “4P3” (four empty squares, a White pawn, three empty squares), the side to move is Black (b), and the en passant field holds e3, the square the pawn passed over. Black hasn’t moved yet, so the move number stays at 1.
When to Use PGN and When to Use FEN
- Keeping or sending a whole game: PGN. It keeps the moves and comments, so you can set the game up again move by move later.
- Passing along just a position from the middle of a game: FEN. It is handy for puzzles, or when you want to start playing from a particular position.
A game that starts from a middle position adds SetUp and FEN tags to the PGN to record the starting position.
In the App
The Chess Board app offers PGN and FEN import and export as part of the one-time purchase of additional features.
- Exporting: In the saved games list, choose “Export (PGN / FEN)” from the “…” menu on a game. You can copy the PGN, and you can use “Share PGN file” on iPhone and iPad, or “Save to PGN file” and “Share PGN” on Android. For FEN, you can copy the position of the saved game.
- Importing: From “Import PGN / FEN” in the saved games list, paste a PGN or FEN, or choose a file. The app tells PGN and FEN apart automatically. If a PGN contains more than one game, each is added to your saved games one at a time (up to 100 games at once).
- Comments: Comments on a game are also exported and imported as PGN comments. Variations are not imported; only the main line of moves is read.
The app’s move record uses starting-and-destination notation such as e2e4, but the PGN it exports uses algebraic notation such as Nf3.
