Skip to content
TabKiwiTabKiwi

Code to Image

Turn a code snippet into a crisp, syntax-highlighted PNG for slides, docs and social posts.

DeveloperRuns in your browser. Your files never leave this device.
Loading tool…

About this tool

Paste a snippet, pick the language and get a polished image of it: highlighted tokens, optional line numbers, a window frame with a file name and a gradient or solid backdrop. Six editor themes, adjustable font size, padding and width, and 2× or 3× export keep the text sharp on high-resolution screens and in presentations. The image is drawn on a canvas in your browser, so your code is never uploaded.

How to use Code to Image

  1. Paste your code and choose its language.
  2. Pick an editor theme and a background.
  3. Adjust font size, padding, width and line numbers.
  4. Download the PNG or copy it straight to the clipboard.

Frequently asked questions

Why is the downloaded image bigger than the preview?

The export scale multiplies the pixel size. At 2× a 700-pixel card becomes 1400 pixels wide, which stays sharp on retina displays and projectors.

Can I make the background transparent?

Yes. Choose Transparent as the background and the PNG keeps only the editor card, ready to place on any slide.

What happens with very long lines?

With the width set to fit the code, the card grows to the longest line. With a fixed width, long lines wrap onto continuation rows without a line number.

Why does copying the image fail?

Some browsers, particularly older Firefox versions, do not allow pages to put images on the clipboard. Download the PNG instead.

More Developer tools

View all 91 →