Turn code into a styled screenshot image.
The Code Screenshot Generator turns a code snippet into a styled PNG with syntax highlighting, a colored or transparent background, optional window chrome and line numbers. Choose a language, theme, background and padding, then download the image or copy it to the clipboard.
A code screenshot is an image of source code styled for sharing in slides, social posts, articles and chat. Instead of capturing an editor window, the tool draws the code itself: it colors tokens such as keywords, strings, numbers and comments according to the language, places the code on a rounded card with optional macOS-style window dots, adds a gradient or transparent backdrop around it, and then renders that page element to a PNG bitmap in your browser at 2x pixel density. A theme is a fixed set of colors for the card background, text, line numbers and token types. Because the result is a picture, the text in it cannot be selected or copied, so keep the code text available elsewhere when readers need to copy it.
Themes: Night (dark), Dracula (dark), Paper (light), Sand (light) and Forest (dark). Backgrounds: Sunset, Ocean, Violet, Mint, Slate and Transparent.
Auto-detect, javascript, typescript, json, html, xml, css, sql, python, java, csharp, cpp, go, rust, php, ruby, bash, yaml, lua and markdown.
The code is truncated to its first 20,000 characters in the image, the padding is between 0 and 128 pixels, and the window title can have up to 60 characters.
A PNG rendered at 2x pixel density, so it stays sharp on high-resolution screens. Its dimensions depend on the code, padding and options you chose.
No. The highlighting and image rendering happen in the page, and the PNG is created in your browser, so the code is not sent anywhere.
No. The result is a bitmap. If readers need to copy the code, publish it as text next to the image.