Chess board image API
Put a FEN in a URL and get a chess board image back. The ChessVG board image API returns a PNG or SVG for any position, with your choice of theme, pieces, arrows and colors. It is free, needs no API key, sends CORS headers, and every image is cached for a year, so the same URL always loads fast.
/b/r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R.png?theme=ocean&arrows=a7a6URL format
https://chessvg.com/b/<FEN piece placement>.png?<options> https://chessvg.com/b/<FEN piece placement>.svg?<options> https://chessvg.com/b/start.png (starting position)
Write the FEN's piece placement straight into the path, slashes included. A full FEN (with side to move, castling and so on) also works if you URL-encode it; only the piece placement is drawn. Illegal positions are fine, because this is an image tool, not an engine.
Options
| Parameter | Values | Default | What it does |
|---|---|---|---|
theme | theme id (see below) | chesssolve | Base colors for squares, frame and background. |
pieces | piece set id (see below) | merida | Piece artwork. |
orientation | white | black | white | Side shown at the bottom. flip=1 does the same as black. |
arrows | e2e4,g1f3 or e2e4-ff0000 | none | Up to 16 arrows, comma-separated, with an optional hex color after a dash. |
coords | 1 | 0 | 1 | Show file and rank labels. |
size | 128–2048 | 1024 | PNG width and height in pixels. Ignored for SVG. |
light, dark | hex without # | from theme | Light and dark square colors. |
frame, frameColor | 0–64, hex | from theme | Frame width (relative to a 1024 board) and color. |
padding | 0–256 | 32 | Space between the frame and the image edge. |
radius | 0–128 | 12 | Corner radius of the frame. |
bg, bg2, angle | hex | none, hex, 0–360 | from theme | Solid background, or a gradient when bg2 is set. bg=none gives a transparent background. |
Themes
chesssolve (ChessSolve), wood (Classic Wood), green (Tournament Green), ocean (Ocean Blue), coral (Coral), graphite (Graphite), lavender (Lavender), marble (Marble), sunset (Sunset), emerald (Emerald Night), rosewood (Rosewood), midnight (Midnight).
Piece sets
alpha, california, cardinal, dubrovny, fresca, gioco, governor, kosal, maestro, merida, spatial, staunty, tatiana. Piece artwork comes from the open-source Lichess project.
Examples
- Markdown in a GitHub README or Notion page:

- Transparent PNG for a video overlay:
https://chessvg.com/b/start.png?bg=none&frame=0&padding=0&size=2048
- Black at the bottom with two colored arrows:
https://chessvg.com/b/start.svg?orientation=black&arrows=e7e5-2e7d32,g8f6-1565c0
Errors
An invalid FEN or a missing .png/.svg ending returns HTTP 400 with a JSON body: {"error": "...", "docs": "..."}. Unknown themes and piece sets fall back to the defaults instead of failing.
For AI assistants and developers
A machine-readable description is at /openapi.json (OpenAPI 3.1). AI assistants can show a chess position to a user by building one of these URLs and displaying it as an image. Please link to chessvg.com where you show the images, and contact us before sending very high volumes.
Prefer a visual editor?
The ChessVG editor builds the same images by drag and drop, with uploaded backgrounds and one-click social-media sizes. Its Export tab can copy an API link for the board you designed.