How to Embed Mid-Game Chess Positions on Chess.com (and Fix the Off-by-One FEN Bug)
Background chessboard (AdobeStock #212619223), bug icon (AdobeStock #522971104) & ✔️/❌ icons (AdobeStock #560515957); composition by RJFraser

How to Embed Mid-Game Chess Positions on Chess.com (and Fix the Off-by-One FEN Bug)

Avatar of RJFraser
| 2

Adding a custom position or move-by-move animation to your Chess.com blog post makes your analysis clear and engaging. But if you’ve ever tried to paste a FEN or PGN into the editor and seen:

Please enter a valid FEN or PGN

…you’re not alone. There’s a subtle quirk in Chess.com’s parser: it mishandles the full-move counter in FEN strings, rejecting perfectly legal positions. This guide walks you through every step—from setting up your position in the Analysis Board, to pasting into the blog editor, to the final workaround—complete with screenshots so even non-techies can follow along.


1. Prepare Your Position in the Analysis Board

  1. Open the standalone Analysis Board in a new tab.

  2. Recreate your mid-game position by entering moves or pasting a move list into the input field. For example, after playing the Najdorf, Opočenský Variation, through 6…e5, you’ll see:

Najdorf, 6.Be2, Opočenský Variation, 6…e5

3. Copy the FEN

    • Click SharePGN tab → copy the FEN string displayed (top line).

Figure 2. In the “Share” dialog, switch to PGN

2. Insert Into Your Blog Editor

  1. Open the Chess.com blog editor and navigate to the post you’re writing.

  2. Click the chess-board icon in the toolbar to open the embed dialog.

  3. Select “Load from FEN” (or “Load from PGN”) in the popup.

  4. Paste the FEN you copied into the text box.

  5. Click Load, then Insert.
Chessboard icon in blog editor toolbar

3. Encountering the “Invalid FEN or PGN” Error

If you see:

Please enter a valid FEN or PGN

even though you copied directly from the Analysis Board, it’s not your typo. It’s the full-move counter in the last field of the FEN:

… <Half-move> <Full-move>

By FEN standard, the Full-move field equals the next move number when it’s White’s turn. So after Black’s 6th move, it reads 7:

rnbqkb1r/1pp2ppp/p2p1n2/4p3/3NP3/2N5/PPP2PPP/R1BQK2R w KQkq e6 0 7

But Chess.com’s blog parser still expects the older convention—it wants the full-move to equal the last move played. In other words, it wants 6, not 7.


4. Workaround: Subtract One from the Full-Move

  1. Edit the FEN: change the final number from 76:

  2. Re-load it in the blog editor (Load → Insert).

- rnbqkb1r/1pp2ppp/p2p1n2/4p3/3NP3/2N5/PPP2PPP/R1BQK2R w KQkq e6 0 7
+ rnbqkb1r/1pp2ppp/p2p1n2/4p3/3NP3/2N5/PPP2PPP/R1BQK2R w KQkq e6 0 6

This simple off-by-one fix clears the “invalid FEN” error every time.


5. Embedding a Full PGN Move-Player

If you want an interactive move list instead of a static diagram, combine the corrected FEN with your move sequence:

[SetUp "1"]
[FEN "rnbqkb1r/1pp2ppp/p2p1n2/4p3/3NP3/2N5/PPP2PPP/R1BQK2R w KQkq e6 0 6"]
7.Nb3 Be7 8.Be3 Be6 9.Qd3 O-O 10.O-O h6 11.Bd2 Nc6
12.a3 Rc8 13.Rad1 Nd7 14.Bc1 b5 15.Nd5 Bg5 16.Bxg5 Qxg5
17.Qd2 Qxd2 18.Rxd2 Rfd8 19.c4 bxc4 20.Bxc4 Rb8
21.Rfd1 Bxd5 22.Rxd5 Nf6 23.Rxd6


6. Why Document This Bug?

  • Save Time: No more frustration over “invalid FEN” when the string is correct.

  • Educate Readers: Teach the real FEN standard and the current Chess.com quirk.

  • Help the Community: Post links to this guide wherever bloggers share tips—everyone benefits.

Embed mid-game positions in any opening with confidence—now you know the secret off-by-one FEN fix!

About Me

This blog is in its early stages of development and will primarily focus on chess — especially opening theory, repertoire building, and reflections on my growth as a player.

You’ll also find links here to a few side projects, including posts featuring curated music playlists (🎶 English, K-Pop, Latin) and cultural commentary (The 2020s in 10 NYT Articles). While these live on the blog, they’re more prominently featured on my profile and will continue to evolve there as a parallel project.

For now, only a few of the above have been published, as I’ve just begun posting.


Quick Links

  •  

Chess Openings

  • As White:
    Ruy López (1.e4 e5 2.Nf3 Nc6 3.Bb5)

  • As Black vs 1.e4:
    Sicilian Najdorf (1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6)

  • As Black vs 1.d4:
    Indian Defence (1.d4 Nf6)