Carbon made the code screenshot a genre. Code2Img is that idea with an API, share pages, an MCP server and exports up to 4× built in.
Carbon established the genre: "create and share beautiful images of your source code", as its own home page puts it, with an editor you start typing into or drop a file onto. Code2Img is that idea carried into places Carbon was never designed to go — a script, an agent, a link that has to unfurl. Checked against Carbon's own published description on 15 November 2026.
A well-known, widely used editor for code screenshots: paste or drop a file, choose a theme and a language, adjust the window and background, export. Its reach is part of its value — a Carbon image is instantly recognisable, and it has been the default visual for code on the web for years. Carbon also publishes its own integrations, bundling Carbon into editors such as VS Code and IntelliJ.
POST /api/v1/images takes a JSON config and returns bytes, or a stored URL. Keys are scoped and hashed, quotas are per key and per IP, retries can carry an idempotency key, and errors are RFC 9457 problem documents./i/<slug>, each with an Open Graph image, an expiry you set and a delete button you own.Editor breadth and ecosystem: the integrations inside other editors, and the sheer number of themes and window presets people have published for it over the years. If you want Carbon's exact look, or you want a Carbon button inside your IDE, Code2Img is not a substitute — and it is not trying to clone someone else's visual identity.
Both tools make a good-looking image of code. Carbon is the reference implementation of the genre and has the integrations; Code2Img is built so the same renderer can be called by a machine, at a higher scale, and can hand back a URL that previews properly in a chat window. If your last five screenshots were made by hand, either is fine. If your next five hundred have to be made by a script, that is the case Code2Img was written for. Compare the output yourself.
The same comparison, for the editor you might be switching from.
Theming and settings that read well, one guide per language.
The editor needs no account, and the API answers on a free key.