Renders a code snippet to a downloadable PNG.
Code to Image renders a code snippet to a downloadable PNG right in your browser. Paste any code, pick a dark or light theme and font size, and get a clean monospace screenshot you can save and share. It's handy when you want a quick image of code for docs, slides, or social posts without installing anything or signing up.
No. The entire conversion runs in your browser using a canvas element, and the PNG is generated locally. Your code is never uploaded or stored anywhere.
It exports a PNG image, downloaded as code.png. The image is rendered at 2x scale for crisp output on high-density screens.
No. Code is drawn as plain monospace text in a single foreground color over a solid background. You can choose a dark or light theme, but tokens are not colorized.
Yes. Set the font size in the options; values are clamped between 8 and 48 pixels, and anything outside that range or left blank falls back to a sensible default.
The width and height are calculated automatically from the longest line and the number of lines, plus padding. There is a minimum canvas size so very short snippets still produce a usable image.