Code Screenshot Generator — Beautiful Code Images
Turn code into a beautiful image: syntax highlighting, gradient background, macOS window bar, rounded corners and shadow. Export high-resolution PNG. Free and private.
Code Screenshot Generator
Paste your code and get a beautiful, shareable image: real syntax highlighting, a gradient background, an optional macOS-style window bar, rounded corners and a soft shadow. Perfect for blog posts, slides, social media and documentation.
Features
Choose from 20+ languages, several gradient backgrounds, adjustable padding and an optional window title. Export a crisp high-resolution PNG (1x, 2x or 3x). Everything renders and exports in your browser — your code is never uploaded.
Privacy
This tool runs 100% in your browser. There is no file upload at all — you only paste text into a textarea. Syntax highlighting (via Prism.js) and PNG export happen entirely in your browser. Your code is never sent to any server and nothing is stored — closing the tab clears everything.
Frequently asked questions
What size is the PNG?
It matches the size of the frame in the preview multiplied by the chosen scale: at 2x the image is twice as wide and twice as tall as the preview, and 3x gives even more detail.
How do I get a transparent background?
Choose the transparent background: the gradient disappears and only the code window remains.
What if the export fails?
A status message shows the error from the browser. Try the 1x scale or another recent browser.