Chess Board Images SVG
Output Readme Download Replit Sel. & Copy Full

This repl converts a fen string to a board image. The staticsvg.js file does all of the heavy lifting. Customize the code to make your own board image creator.

For compatibility with server-side code, the output is an xml file string that is used as the src for an iframe. You can remove the xml stuff to generate an svg element if you wish.

The parsefen.js is not used for anything, but does offer a couple functions that might be useful in some situations. The justParse() offers boilerplate code that could be used for other parsing needs. The to64() function converts normal fen strings to a 64 character string with each square being represented by exactly character. This format is one possibility to make changes and future parsing simpler.

Read this blog post about creating the chess board images, visit to express your support for this project and signup for updates, and/or check out more of my projects at