FEN ↔ PGN Converter
Convert chess positions between FEN and PGN notation. Includes visual board preview.
Live FEN
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1Live PGN
FEN & PGN: The Two Essential Chess Notations
Every chess player, coach, and content creator will encounter FEN (Forsyth-Edwards Notation) and PGN (Portable Game Notation) at some point. These two formats form the backbone of digital chess communication. FEN describes a single chess position in one compact line of text. PGN stores complete games including metadata, moves, and annotations. Understanding both is essential for anyone serious about chess. This tool converts between them instantly, allowing you to extract PGN from any FEN position or retrieve a FEN from a PGN file.
What is FEN?
FEN was created by Scottish journalist David Forsyth in the 19th century and later extended by Steven Edwards. It represents a chess position using 6 space-separated fields. The first field is the piece placement encoded from rank 8 down to rank 1, with uppercase letters for white pieces (K, Q, R, B, N, P) and lowercase for black (k, q, r, b, n, p). Digits represent consecutive empty squares, and ranks are separated by forward slashes. The second field indicates the active color — either w (white to move) or b (black to move). The third field shows castling availability using KQkq (K = white kingside, Q = white queenside, k = black kingside, q = black queenside) or a hyphen if neither side can castle. The fourth field records the en passant target square (e.g., e3) or a hyphen if none exists. The fifth and sixth fields track the halfmove clock for the 50-move rule and the fullmove number respectively. Example: rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1 shows the position after 1.e4, with black to move, all castling rights intact, and en passant available on e3.
What is PGN?
PGN (Portable Game Notation) was developed by Steven Edwards in 1993 and became the universal standard for sharing chess games on computers and the internet. A PGN file has two distinct parts. The first part is the tag pairs section, which contains metadata enclosed in square brackets. There are seven mandatory tags: Event, Site, Date, Round, White, Black, and Result. Optional tags include ECO (Encyclopedia of Chess Openings code), WhiteElo, BlackElo, FEN (for non-standard starting positions), SetUp, and others. The second part is the movetext, which lists the actual moves in Standard Algebraic Notation (SAN), optionally annotated with comments in curly braces, variations in parentheses, and evaluation symbols like !, ?, !!, ??, !?, and ?!. A complete PGN for a standard game looks like:[Event "World Championship"]
[Site "Moscow"]
[Date "2024.??.??"]
[Round "1"]
[White "Carlsen, Magnus"]
[Black "Nepomniachtchi, Ian"]
[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 11.Nbd2 Bb7 12.Bc2 Re8 13.Nf1 Bf8 14.Ng3 g6 15.Bg5 c5 1-0
When to Use Each Format
- Use FEN when: Sharing a specific position on social media or forums, setting up a board in analysis software, generating puzzles or quizzes, programming chess engines, or creating embeddable position widgets. FEN's compact one-line format makes it perfect for URLs, database keys, and quick sharing.
- Use PGN when: Sharing full games, storing your personal game collection, submitting games to online databases like chess.com or lichess, publishing game analysis in blogs or books, printing tournament bulletins, or archiving historical games. PGN's structured format preserves the complete narrative of a chess game.
- Use both when: Analyzing games that deviate from standard starting positions (like Chess960), creating teaching materials that start from specific positions, or preparing opening repertoires that reference both positions and full games.
How This Converter Helps
If you have a FEN position and want to analyze it in chess software like ChessBase, SCID, or Lichess, you need to wrap it in PGN format with the SetUp and FEN tags. Our tool does this automatically with a single click. Conversely, if you receive a PGN file that uses a custom starting position (common in Chess960 or training materials), you can extract the FEN instantly to visualize or share just that position. The built-in board preview lets you verify the position before using it.
FEN vs EPD: What's the Difference?
EPD (Extended Position Description) is a superset of FEN that adds operations for software interactions. While FEN purely describes a position, EPD can include: best move suggestions, avoidance moves, depth searches, and other analysis hints. EPD is commonly used in chess engine testing suites and puzzle databases. For everyday use — sharing positions, setting up boards, or PGN conversion — FEN is all you need. This converter supports standard FEN format only.
Common FEN Mistakes to Avoid
- Wrong rank order: FEN must list ranks from 8 to 1 (top to bottom). Writing them from 1 to 8 is the most common error.
- Missing fields: All 6 fields are required. Omitting the halfmove clock or fullmove number (making it optional in some implementations) can cause parsing errors.
- Incorrect piece case: Uppercase = white, lowercase = black. Mixing them up gives the opposite color position.
- Too many/few squares per rank: Each rank must total exactly 8 squares when you count letters as 1 square and digits as their numeric value.
- Invalid castling codes: Only KQkq or a hyphen are valid. Using Kkq (missing Q) is incorrect.
Practical Applications for Coaches and Content Creators
Chess coaches use FEN every day to share positions with students. Instead of describing a position verbally, you can send a FEN string and the student loads it instantly. Content creators embed FEN positions in blog posts, videos, and social media to illustrate key moments. The shareable URL feature in this tool creates a permanent link to any position — perfect for: linking to a puzzle solution in a forum thread, referencing a critical position in a game review article, sharing a position with a student for homework, embedding a position in a coaching website. The Markdown and HTML embed codes make it trivial to add interactive chess positions to any webpage without writing a single line of code.
Frequently Asked Questions
Does this tool convert actual game moves?
No. This tool handles position format conversion (FEN ↔ PGN headers). For analyzing moves or converting move notation, use the Elo Calculator or a dedicated chess engine.
Can I download the board as an image?
Yes! Switch to the Board View tab, enter your FEN, then use the download button (⬇) on the board controls to save a high-resolution PNG for social media, blogs, or coaching materials.
What is the difference between FEN and EPD?
EPD (Extended Position Description) builds on FEN by adding operations like best move suggestions and analysis data. FEN focuses purely on position description. For most purposes including this converter, FEN is sufficient.
Can PGN contain multiple games?
Yes. PGN files can store multiple games separated by blank lines. Each game starts with its own set of tag pairs and movetext. This converter processes one game at a time.
Why does the PGN output have question marks in the tags?
The converter creates minimal valid PGN headers. Replace the question marks with actual event details before using the PGN in a database or submitting it to FIDE.
Does FEN work for Chess960 positions?
Yes. FEN supports any legal chess position including Chess960 (Fischer Random). The starting position is simply described using the actual piece arrangement in rank 1 and rank 8.
