📸 Code Screenshot Generator

Create beautiful code screenshots with syntax highlighting, themes, and gradient backgrounds. Export as PNG or SVG. Runs entirely in your browser.

Last updated: November 8, 2026 · By the BoltQuickTools team

Code
Language & Theme
Background
Window
40px
14px
8px

Turn a snippet into an image you can post

Social posts, slides and some documentation platforms will mangle or refuse a code block. An image of the code keeps its indentation and colours wherever it goes. This page draws one in a window frame on a gradient background.

Producing the image

  1. Paste into the Code box. Pressing Tab inserts two spaces.
  2. Set Language (16 options) and Theme (Monokai, Dracula, GitHub Dark, One Dark, Solarized Dark or Nord; all six are dark).
  3. Click a swatch under Background to pick one of ten gradients.
  4. Under Window, set Filename, Padding, Font Size and Radius, and toggle Window controls (macOS dots) and Line numbers.
  5. Click Export PNG or Export SVG.

What you get from the default snippet

The page opens with a small JavaScript function. In Monokai, function is coloured as a keyword (#f92672), greet as a function name (#a6e22e) because a ( follows it, and the // Say hello line as a comment (#75715e). Export PNG downloads app.js.png at twice the size the preview occupies on screen, and Export SVG downloads app.js.svg. The file name is the Filename field plus the extension, so app.js becomes a double-extension name. With the field empty, the file is called code.png or code.svg.

Where the output can differ from your editor

The highlighter is a simple character scanner, not a parser, so some code is coloured wrongly or drawn badly.

Does my code get sent anywhere?

The preview and both exports are created by this page's JavaScript, and the tool's code does not transmit your snippet. The page does make other requests: it loads the Inter web font from Google Fonts, used for the filename label, the site's analytics script, and ad scripts if you accept them.

How do I get a larger PNG?

Increase Font Size and Padding. The export is always a fixed two times the on-screen size, so there is no separate resolution setting. Large exports can be shrunk afterwards with the image compressor.

Can I edit the SVG later?

Yes. Each token is a separate text element, so it opens as editable text in vector tools. To convert it to a bitmap at a chosen size, use the SVG converter. If what you want to show is a change rather than a snippet, the code diff viewer displays both versions.