Code Screenshot Online
Paste code or open a source file to make a picture of it: syntax colors, line numbers, a window frame and a background. Copy or save it as PNG or SVG. No account, no watermark and no upload.
Code Screenshot & Code Snapshot for VS Code and Cursor, free
- Select code, press Cmd+Alt+C (Shift+Alt+C), and a PNG of it is on your clipboard. No panel button, no website.
- Drawn with your editor theme, token colors, font, ligatures and bracket pair colors.
- The real line numbers of the file, folded code as one row, and PNG at 1x to 4x or SVG.
Optional Zovo Pro, USD 19 once: pictures sized for social posts and slides, and long code split into numbered pictures. 3 free tries for each.
Drop a code file here
or
Any text source file up to 5 MB, with colors for 35 common languages. Or paste code into the box below.
Open this in VS Code or Cursor
In VS Code and Cursor, select lines and press Cmd+Alt+C (Shift+Alt+C on Windows and Linux): a PNG of them is on your clipboard, drawn with your own editor theme, font, ligatures and bracket colors, with the real line numbers of the file.
Free, MIT license. About Code Screenshot for VS Code.
Zovo Pro
Pictures sized for social posts and slides, and long code split into pictures. Zovo Pro, USD 19 once.
In the Code Screenshot extension, Zovo Pro saves the picture at a size for a link preview, X or Mastodon, LinkedIn, a square post, a slide or a story, centred on a blurred copy of its background, and splits long code into numbered PNG files of 15 to 60 lines with the real line numbers. Each Pro tool works 3 times for free. One payment covers the Pro tools in 22 Zovo extensions. Everything that is free stays free.
After a card payment you get a key on the page. With GitHub Sponsors you sign in from the extension. Details on the Zovo Pro page.
Related tools
- SVG Preview & SVG Viewer. Previews an SVG beside its code and saves a PNG at any size.
- Image Editor & Image Resizer. Crops, resizes, annotates and converts images in VS Code.
- Hex Viewer & Hex Editor. Opens any file as hex and text in VS Code.
- SVG to PNG Converter, free in your browser.
- Mermaid Editor Online, free in your browser.
- Graphviz Online, free in your browser.
Questions
Is my code uploaded anywhere?
No. The code stays in this tab. The page colors it and draws the picture with JavaScript, and its Content Security Policy sets connect-src to none, so it cannot send your code anywhere. The coloring library (highlight.js) loads from cdn.jsdelivr.net at a pinned version, and your browser checks its hash before running it. Your code is never sent there.
How do I make a code screenshot?
Paste code into the box, or open a source file. Pick the colors, frame, background and padding, then press Copy PNG to put the picture on your clipboard, or Save PNG or Save SVG to download it. Click a line in the picture to highlight it, Shift+click for a range, and double-click a word to mark it.
Which languages are colored?
The common languages of highlight.js: JavaScript, TypeScript, Python, Java, Kotlin, C, C++, C#, Objective-C, Go, Rust, Swift, Ruby, PHP, Perl, Lua, R, SQL, GraphQL, Bash and shell sessions, JSON, YAML, TOML and INI, HTML and XML, CSS, SCSS, Less, Markdown, Makefile, Diff, Visual Basic .NET and WebAssembly text. The language is picked from the file name or detected from the code, and you can choose it in the list. Other code shows in one color.
PNG or SVG?
PNG is a picture at 1x, 2x, 3x or 4x, good for chats, issues and slides. SVG keeps the code as text, so it is sharp at any size and the text can be selected; a computer without the font shows the next one in the list. A PNG wider or taller than 16,384 pixels is made at a smaller scale, and the page says which.
Can I use my own editor theme and font?
This page has eight color sets, including Dark Modern and Light Modern, and uses the monospace font of your computer. The free Code Screenshot extension for VS Code draws the picture with your own editor theme, token colors, font, ligatures and bracket colors.
Are there limits?
Files up to 5 MB. The picture shows up to 1,000 lines, and lines longer than 1,000 characters are cut with a mark; the page says when that happens. Copying a PNG needs a browser that allows images on the clipboard; if yours does not, use Save PNG.
Is code with HTML or scripts safe to paste?
Yes. The picture is built from text nodes, so code such as a script tag is drawn as text and never runs. Nothing you paste is run.
What is free and what is Zovo Pro?
Everything on this page is free, with no watermark. The Code Screenshot extension for VS Code is free too. Pictures sized for social posts and slides, and long code split into numbered pictures, are Zovo Pro in the extension, with 3 free tries each. One USD 19 payment covers the Pro tools in every Zovo extension.