Code to Image: Code Screenshot Maker (PNG)

Make a good-looking picture of code for posts, slides and docs.

Use the tool

Why this tool exists

Paste the code, choose a language (JavaScript, Python, JSON, HTML, CSS, SQL, Go, Rust, shell or plain), a dark or light theme, font size, padding, background and scale. Keywords, strings, numbers and comments are coloured with simple pattern rules, and the image is drawn on a canvas with a window title bar, optional line numbers and rounded corners, then saved as PNG.

Colours come from pattern matching, not a full parser, so unusual syntax may be tinted imperfectly. Images are drawn in your browser; the code is not uploaded.

The file is read in your browser and is not uploaded anywhere.

How to use it

  1. Paste your code.
  2. Pick the language and theme.
  3. Adjust padding, background and scale.
  4. Download the PNG.

Frequently asked questions

Which fonts are used?

Your system's monospace font, so the image looks different on different computers.

Is code text kept for accessibility?

No, the image is pixels; add alt text or include the code as text.

Can I use transparent backgrounds?

Yes, choose "transparent".

Is my data sent anywhere?

The file is read in your browser and is not uploaded anywhere.