I'm thinking about creating ANKI flashcards deck with my games positions as a training tool. Is there a way to programmatically (can be whatever programming language, I'll figure it out) generate diagrams from a bunch of FEN strings?

1 Answer 1


You can make use of the online fen2png.com site, calling it with wget or curl:

curl 'https://fen2png.com/api/?fen=r1b1k1nr/p2p1ppp/n2B4/1p1NPN1P/6P1/3P1Q2/P1P1K3/q5b1%20w%20kq%20-%20-&raw=true' > ~/a.png

Or you can use a similarly-named python code (which I have not tested):


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.