Code Screenshot

Turn code into syntax-highlighted PNG images for docs, slides and social posts.

Works offline Native desktop macOS & Windows
Code Screenshot
What it does

Sharing a snippet as a screenshot usually means pasting your code into a website. The Code Screenshot tool renders highlighted code into a PNG on your machine, with themes, backgrounds and optional window chrome. Your code, which may be proprietary, is never sent to a service.

Shiki syntax highlighting

Highlighting comes from Shiki, with 22 languages available, including TypeScript, Python, Rust, Go, SQL, Bash and PHP.

Eight themes

Choose from GitHub Dark, GitHub Light, Dracula, Nord, One Dark Pro, Monokai, Catppuccin Mocha and Solarized Light.

Backgrounds and padding

Pick one of five gradient backgrounds or a transparent one, and set padding from 16 to 128 pixels.

Window chrome and title

Add a window frame with an optional title, or turn it off for a plain code block.

Save or copy at 2x

Export a PNG rendered at twice the pixel ratio for sharp results, or copy the image to the clipboard where the system allows it.

FAQ

Is there an offline alternative to Carbon for code screenshots?

Yes. Code Screenshot in HackUtilities renders the image locally with Shiki, so your code is not uploaded and it works without a connection.

Can I export with a transparent background?

Yes. Select the transparent background swatch, and the exported PNG will not include a gradient behind the code window.

Pairs well with
All 46 tools →
Try Code Screenshot free for 14 days

No card, no account. Every tool included, bought once.

Download