# Code to Image > Free tool that turns code snippets into beautiful syntax-highlighted images. 40+ themes, 35+ languages, gradient backgrounds, macOS/Windows window chrome, PNG/SVG/JPEG export. Built for humans (web editor) and agents (API, MCP, share links). ## Agent access - [MCP server & API docs](https://codetoimage.com/mcp-server): Human-readable setup for every agent surface - [Agent skill](https://codetoimage.com/SKILL.md): Full usage guide. Install with `npx skills add https://codetoimage.com` - [OpenAPI schema](https://codetoimage.com/api/openapi.json): Hosted render API — POST/GET /api/image returns PNG or SVG - [Option catalog](https://codetoimage.com/api/options.json): Accepted themes, languages, fonts, and gradient presets - MCP server (streamable HTTP): `claude mcp add --transport http codetoimage https://codetoimage.com/mcp` - Developer portal: https://codetoimage.com/developers (redirects to /mcp-server) ## Conventions - `/mcp-server` supports `Accept: text/markdown` content negotiation (responses send `Vary: Accept`). - Unknown paths return a real HTTP 404; request one with `Accept: text/markdown` for a plain list of where to go instead. - API errors are always JSON: `{"error", "code", "hint"}`. Branch on the stable `code` field. ## Quick reference - Render: `POST https://codetoimage.com/api/image` with JSON `{"code": "...", "language": "javascript", "theme": "github-dark"}` → PNG bytes - Editable share link: `https://codetoimage.com/#s=BASE64URL_JSON` where the JSON holds the same fields - Any share link becomes a hotlinkable image by swapping `/#s=` for `/api/image?s=` ## Privacy The web editor renders entirely in the browser — pasted code never leaves the device. The hosted API renders statelessly server-side and stores nothing. Do not send private or sensitive source without authorization.