Code Screenshot Maker

Turn code into a syntax-highlighted image and copy it straight out

Loadingโ€ฆ

Was this tool helpful?

About this tool

Paste code and get a syntax-highlighted image of it. Nine themes, gradient or transparent backgrounds, macOS and Windows window decorations, line numbers and per-line highlighting are all available, and the result can be downloaded or copied straight to the clipboard for Slack or a blog post. The preview on screen is the exported image itself, so there are no surprises after you download.

How to use

  1. Paste your code. The language is detected from the content and file name.
  2. Pick a theme and background, then adjust padding and font size.
  3. To emphasise lines, type something like 3,5-7.
  4. Press Copy image, or download the PNG at 1x, 2x or 3x.

Frequently asked questions

What do 2x and 3x mean?
They draw the same picture at double or triple resolution. Use 2x or more for retina screens and presentation slides; 1x is plenty inside a blog post. The type stays the same size, the pixels just get denser.
Copy image does nothing.
Your browser does not support writing images to the clipboard - some Safari versions and older browsers behave this way. Use the PNG download instead.
My non-Latin comments look wrong.
The chosen font does not cover those characters. JetBrains Mono and Fira Code are Latin-only, so anything else falls back to a system font. For code with a lot of CJK text, choose the system monospace option.
What goes into the share link?
Your code and every setting, encoded after the # in the URL. Browsers never send that part to a server, so it stays out of access logs - but the link itself contains the code, so do not share anything secret.
Why draw it instead of capturing the screen?
Screen-capture approaches render differently in each browser, and if the web font is not ready when the shot is taken, the typeface changes entirely. Drawing straight onto a canvas produces the same image everywhere.

Your code is processed only in the browser and never sent to a server. Highlighting grammars and themes are fetched on demand, so the first time you pick a new language or theme there may be a brief wait.

Similar tools