ChessVG☕ Support on Ko-fi

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.

Ruy Lopez position rendered by the ChessVG board image API in the Ocean theme, with an arrow from a7 to a6.
/b/r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R.png?theme=ocean&arrows=a7a6

URL 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

ParameterValuesDefaultWhat it does
themetheme id (see below)chesssolveBase colors for squares, frame and background.
piecespiece set id (see below)meridaPiece artwork.
orientationwhite | blackwhiteSide shown at the bottom. flip=1 does the same as black.
arrowse2e4,g1f3 or e2e4-ff0000noneUp to 16 arrows, comma-separated, with an optional hex color after a dash.
coords1 | 01Show file and rank labels.
size128–20481024PNG width and height in pixels. Ignored for SVG.
light, darkhex without #from themeLight and dark square colors.
frame, frameColor0–64, hexfrom themeFrame width (relative to a 1024 board) and color.
padding0–25632Space between the frame and the image edge.
radius0–12812Corner radius of the frame.
bg, bg2, anglehex | none, hex, 0–360from themeSolid 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:
    ![Sicilian Defense](https://chessvg.com/b/rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR.png?theme=green)
  • 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.