Chess board images and puzzles

Put any chess position in a URL and get a board image back: rnbqkbnr.com/<fen> for an SVG, add .png for a PNG. Free to use, embed and share. There are also a few chess puzzles and toys.

Puzzles and games
Board images

SVG

Add a FEN after the domain: https://rnbqkbnr.com/rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR is the start position. A full FEN works too; everything after the board is ignored (…/RNBQKBNR w KQkq - 0 1). The slashes between ranks are optional.

PNG

Add .png to the end: https://rnbqkbnr.com/rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR.png. Use it anywhere that accepts an image link.

GIF

Make animated GIFs in the browser at rnbqkbnr.com/gif. Add a FEN and .gif to start from a position, e.g. rnbqkbnr.com/rnbqkbnr/ppppppp.gif. Download the GIF to share it.

Web component

Include chess-board.js (link it, or copy it to your server), then add <chess-board> elements anywhere in your HTML. It draws positions, plays through games with animated moves, and shows arrows that change from move to move. Click the right half of this board to go forward, the left half to go back:

<chess-board controls
  dark="steelblue" light="lightgray"
  border="12 black white"
  moves="1. e4 e5 2. Nf3 {[%cal Rf3e5]} Nc6 {[%cal Gc6e5]}
    3. Bb5 {[%cal Rb5c6,Rf3e5]} a6 4. Ba4 Nf6 5. O-O"></chess-board>
  • fen the position (the first one, when there are moves)
  • moves a move list or a whole PGN to step through, with comments and arrows
  • arrows / squares arrows (from square + to square) and highlighted squares, in several colours
  • controls / autoplay / loop a button bar, and playing the moves by itself
  • dark / light / border / orientation colours, border and which side is at the bottom

Documentation, options and examples

About

Made by TripleLog. I wrote a blog post about generating chess board images. More projects, code snippets and blog posts at triplelog.com.