I'm new here, and I would like to know how some members of this forum are creating these nice chess diagrams for analysing positions in their answers, the picture below explains well what I'm meaning. Thank you for help. diagram

  • 8
    I'd upvote this question twice if I could. Commented Jan 22, 2014 at 19:37
  • 2
    Thanks Henry. I think this should be explained as a well written tutorial for beginners on this forum, explaining to them the FEN notation, and how to create this animated diagrams :)
    – mounaim
    Commented Jan 22, 2014 at 20:12
  • 2
    It should at least be in the Help section, I'd think. Otherwise you have to go around "editing" people's posts just to see what code they used to generate the interactive diagrams! Commented Jan 22, 2014 at 20:47
  • @AlwaysLearningNewStuff it's still displaying don't worry :)
    – mounaim
    Commented Jan 23, 2014 at 8:20
  • Actually, the players are always NN-NN. Is that easy/hard to change?
    – user2001
    Commented Jan 28, 2014 at 17:42
  • @RauanSagit try this [Title "put your title here,the one that will substitute the NN-NN title"], don't forget to put this between <pre> <code> </code> </pre> tags :)
    – mounaim
    Commented Jan 28, 2014 at 21:34
  • @RauanSagit: Sorry for answering this late, I did not recieve notification of your comment-I will try to find out how to set title and players and report you my results. Sorry again-best regards. Commented Feb 1, 2014 at 3:11
  • @RauanSagit: Here is the link that displays an example below. When adding additional info ( event, names of players and such ) add them below [fen ""]. They should be indented by pressing spacebar 4 times as well. There is no need to skip one line, just put them under FEN. Best regards. Commented Feb 1, 2014 at 3:40
  • I still didn't manage to make it work (adding player names to a diagram). Is there a working example here on the Chess SE site? Cheers.
    – user2001
    Commented Feb 14, 2014 at 7:51
  • @RauanSagit: I did not receive information about your comment, so I apologize for answering this late. Try to edit this answer of mine and you will see how I added title and player names. Best regards. Commented Feb 27, 2014 at 13:35

3 Answers 3


I personally use this site for that.

It is free, and it is an online tool.

enter image description here

In your answer you paste that code like this:

  1. Press space bar 4 times;
  2. Type square brackets ( [] );
  3. Type fen "" inside the brackets ( [fen ""] );
  4. Paste your code inside the "" ( [fen "Your FEN goes here"] );

If you decide to input variations like in the above picture you need to do this:

  1. Press enter twice;
  2. Press space bar 4 times;
  3. Input moves;

Here is an example:

enter image description here

If you have further question leave a comment and I will help you.

Hopefully this answer helps you.

Best regards.

  • 2
    The problem with using a tool that is not integrated with SE is that if that site goes away, our content will fail.
    – Tony Ennis
    Commented Jan 23, 2014 at 4:12
  • 1
    @Tony: I'm not sure I follow. Why would our content fail if the above mentioned tool goes away? The content has been transferred, not so?
    – firtydank
    Commented Jan 23, 2014 at 13:29
  • @FranS No. If I understand, we'd be including a link to another site. The code for the chessboard lives at the other site. If that site goes away, all we'd have are broken links.
    – Tony Ennis
    Commented Jan 23, 2014 at 23:14
  • 2
    @Tony: Not sure where he mentions linking to that site directly - as far as I can tell he simply uses the external site to generate the FEN, which is then copied into SE. When that site disappears, his nice tool will be gone but none of the FEN's stored here will be impacted.
    – firtydank
    Commented Jan 24, 2014 at 7:40
  • @FranS Ah, I see. He's left off part of the instructions. Unless I am out of date, what he has will not work due to missing 'pre' and 'code' tags.
    – Tony Ennis
    Commented Jan 24, 2014 at 11:56
  • @TonyEnnis: Member FranS is right-I use external tool to generate FEN, then I copy/paste the FEN code here, according to SE format. " Ah, I see. He's left off part of the instructions. Unless I am out of date, what he has will not work due to missing 'pre' and 'code' tags. " Everything works-the above described procedure was used several times in my answers. You can try the above example to reassure yourself. Best regards. Commented Jan 24, 2014 at 13:39
  • @FranS Yep, it works as ALNS says. However, sometimes I have to put a blank line between the FEN and the moves. I don't know why, and I would not say it is because of the lack of PRE and CODE tags.
    – Tony Ennis
    Commented Jan 25, 2014 at 15:23
  • @TonyEnnis: Yes, you need a space between [fen "] and the moves. Also that first line must be indented by pressing space 4 times. Best regards. Commented Jan 25, 2014 at 15:25

The tool does its best to display a game title and anything else based on valid pgn headers provided. Headers are provided in the following way: [Name "Value"] with the square brackets and quotes as shown.

Here's some additional information about non-standard headers that are supported:

  • StartFlipped - if this is provided, the board will appear with black on the bottom and white on the top. If a FEN is provided with black to move, this will happen by default, however if this header is provided it is always followed.
    e.g. [StartFlipped "1"]

  • StartPly - if a start ply is provided, the replayer will initially display the position after the given numeric ply. For example, see the second diagram in this question.
    e.g. [StartPly "5"]

  • Title - if an explicit title is provided, that will be the displayed title on the game. If no title is provided, the replayer will show game information based on the white player name, black player name, location, and result. If you are interested in the specifics, see the actual javascript code in github.

  • I'd be happy to elaborate if there are any questions, I just tried to get the basics in some sort of public form instead of just floating around in my head...
    – Andrew Mod
    Commented Feb 9, 2014 at 15:26
  • Is the github repo still taking issues and PRs?
    – qwr
    Commented Aug 2, 2022 at 18:45
  • Sure, I'm not sure how quickly changes can make it to this site, but I'm happy to review on github.
    – Andrew Mod
    Commented Aug 3, 2022 at 19:26
  • Also lichess has a new lightweight viewer with a lot of features github.com/lichess-org/pgn-viewer
    – qwr
    Commented Aug 5, 2022 at 18:04

All you have to do is use the following sequence.

[FEN "put your fen here but it's optional. You can leave this tag out"]
(blank line)
1. e4 e5 2. d4 *


I don't think this works on meta... but it works on the main site.

Now, it's fiddly. It frequently takes me a few tries to get it right.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .