SnapCode Studio — Code Screenshots
Beautiful code screenshots in one shortcut — straight to your clipboard.
SnapCode Studio turns the code you selected into a polished, share-ready image using your actual editor theme: real colours, real font, real tab width, real line breaks. No shutter button, no save dialog if you don't want one.
Get Pro — $9 (one-time) · no subscription · 14-day refund · 3 devices · works offline for 14 days

The two extensions everyone reached for are dormant: CodeSnap (4M+ installs) last shipped in July 2021, Polacode (1.8M installs) in September 2019. They still only produce a PNG, with a fixed set of frames and no idea what an Instagram post or an Open Graph card actually needs.
|
CodeSnap (2021) |
Polacode (2019) |
SnapCode Studio 0.2 |
| One shortcut → PNG on the clipboard |
shutter click, then save |
preview, then save |
Ctrl+Alt+S copies in one step |
| Zoom / resolution |
1×–4× |
1×–3× |
1×–4× (1× and 2× free) |
| Vector / print export |
— |
— |
SVG and PDF |
| Exact social sizes |
— |
— |
1080×1350, 1080×1080, 1200×630, 1920×1080 |
| Line highlight / focus mode |
— |
— |
click a line, the rest dims |
| Transparent PNG |
— |
— |
real alpha channel |
| Brand presets |
— |
— |
save a look, apply in one click |
| Price |
free (unmaintained) |
free (unmaintained) |
free, Pro $9 once |
Features
Free
- One-shortcut capture — Ctrl+Alt+S (Cmd+Alt+S on macOS) captures the selection or the visible editor area and copies a 1× PNG to the clipboard. Ctrl+C and Ctrl+S work inside the studio too.
- Editor-accurate rendering — background, foreground and syntax colours come from your active colour theme (including themes installed from extensions); font family, font size, line height, tab size, line numbers and exact line breaks are preserved.
- Studio preview — open the full studio with Ctrl+Alt+Shift+S or the editor context menu to adjust before exporting.
- PNG at 1× or 2×, and a configurable file name pattern.
- Try every Pro control before you pay — gradients, frames, sizes, highlight and presets apply to the live preview immediately; only the export is locked.
Pro — $9 once, no subscription
- SVG vector export and PDF for print or slides.
- High-resolution PNG: 3× and 4× in addition to the free 1× and 2×.
- 16 curated gradient backgrounds — Aurora, Sunset, Ocean, Grape, Forest, Ember, Ice, Coffee, Cherry, Sky, Mint, Lavender, Slate, Candy, Deep Space, Mango.
- Window styles: macOS traffic lights, Windows title bar, minimal, or none — with an editable or hidden window title.
- Exact SNS sizes with balanced layout: 1080×1350 (Instagram / LinkedIn 4:5), 1080×1080 (Instagram square), 1200×630 (X / Open Graph), 1920×1080 (slides / 16:9). The card is scaled up to sit large and centred in the frame instead of floating in empty margin — plus 16:9, 4:5 and 1:1 ratios that fit the content.
- Line highlight / focus mode — click line numbers (or type
5, 9-12) to spotlight a few lines and push the rest back.
- Transparent background (real alpha in PNG and SVG) and any hex background colour with a colour picker.
- Brand presets — save the current look under a name and apply it to the next file in one click.
- Custom watermark — your handle or brand, in any corner.
Licences are handled by Polar with a license key. Activate, deactivate and inspect the licence from the command palette at any time; an activated licence keeps working offline for 14 days.
Screenshots
Getting started
- Select some code — or nothing, to capture the visible area.
- Press Ctrl+Alt+S (Cmd+Alt+S on macOS).
- The studio opens with your selection already rendered and copied to the clipboard. Paste anywhere.
Prefer a right-click? SnapCode: Quick Copy to Clipboard and SnapCode: Open Studio are both in the editor context menu and the command palette.
Commands
| Command |
What it does |
Default shortcut |
SnapCode: Quick Copy to Clipboard |
Capture and copy a PNG |
Ctrl+Alt+S / Cmd+Alt+S |
SnapCode: Open Studio |
Open the preview without copying |
Ctrl+Alt+Shift+S |
SnapCode: Activate Pro License |
Validate and activate a Polar license key |
— |
SnapCode: Deactivate Pro License |
Release this device and return to Free |
— |
SnapCode: License Status |
Show the current licence and last check |
— |
SnapCode: Buy Pro License |
Open the checkout page |
— |
Settings
| Setting |
Default |
Description |
snapcodeStudio.fontFamily |
"" |
Empty uses editor.fontFamily. |
snapcodeStudio.fontSize |
0 |
0 uses editor.fontSize. |
snapcodeStudio.tabSize |
0 |
0 uses the tab size of the current file. |
snapcodeStudio.padding |
40 |
Inner padding around the code. |
snapcodeStudio.margin |
48 |
Outer margin (gradient area) around the window. |
snapcodeStudio.showLineNumbers |
true |
Show real line numbers. |
snapcodeStudio.trimSelection |
true |
Remove the common indentation of the selected block. |
snapcodeStudio.defaultBackground |
editor |
Background preset id (Pro presets need a licence). |
snapcodeStudio.defaultFrame |
basic |
basic, macos, windows, minimal, none. |
snapcodeStudio.defaultRatio |
auto |
auto, 16:9, 4:5, 1:1, 1080x1350, 1080x1080, 1200x630, 1920x1080. |
snapcodeStudio.watermark |
"" |
Default watermark text (Pro). |
snapcodeStudio.watermarkPosition |
bottom-right |
Watermark corner (Pro). |
snapcodeStudio.saveDirectory |
"" |
Empty uses the first workspace folder, then your home folder. |
snapcodeStudio.fileNamePattern |
snapcode-{yyyy}{MM}{dd}-{HH}{mm}{ss} |
Tokens: {yyyy} {MM} {dd} {HH} {mm} {ss} {name} {lang}. |
How the colours stay accurate
SnapCode reads the active colour theme (workbench.colorTheme), resolves its JSON file — including include chains from built-in themes — and maps TextMate-style scopes produced by its tokenizer onto the theme's tokenColors. The webview then overrides editor colours with VS Code's own --vscode-* custom properties, so the background, foreground and line-number colours are exactly those of the running window. If a theme cannot be read, a Dark+/Light+ compatible palette is used instead of a broken image.
The layout is computed from real text metrics measured in the webview, and the same SVG is used for the preview, the PNG and the SVG export — so the exported file is pixel-identical to the preview. Exact social sizes go through the same pipeline: the card is scaled as a whole (font, padding, frame, watermark) so nothing is stretched.
Pro licences (Polar)
- Buy: run SnapCode: Buy Pro License (or press Get Pro in the studio) to open the Polar checkout. The price is a one-time $9.
- Activate: run SnapCode: Activate Pro License and paste the key from your Polar receipt. The key is validated through Polar's public customer-portal endpoint, then stored in VS Code's SecretStorage — never in settings or logs.
- Devices: the Pro benefit allows 3 devices per key. SnapCode registers this device with a readable label (
hostname · VS Code) and keeps the activation id, so you can release it with SnapCode: Deactivate Pro License. If a device activation is released on Polar's side, the next check quietly re-registers instead of rejecting a valid key.
- Offline: a successful check is trusted for 24 hours; if Polar cannot be reached, Pro keeps working for up to 14 days from the last successful check. A key that Polar reports as revoked, disabled or expired turns Pro off immediately.
No account, e-mail or telemetry is sent anywhere. The only network call the extension makes is the licence check you trigger, and it contains your license key and Polar's organization id.
FAQ
Do I need an account or a subscription?
No account, no subscription. Pro is a one-time $9 purchase; the key in your Polar receipt is all you need.
What exactly do I get for $9?
Everything in the Pro list above: gradients, window frames, exact social sizes, line highlight, transparent/custom backgrounds, brand presets, watermark, SVG and PDF export, and 3×/4× PNG. Free stays free for 1×/2× PNG, the studio, and the theme-accurate renderer.
Can I try Pro before paying?
Yes — every Pro control is live in the preview. The export stays locked until a key is activated, and on the next start the free plan opens with free defaults.
How many machines can I use?
3 devices per key, and you can move the licence between them with Activate / Deactivate. A released device is freed on Polar immediately.
Is my code sent anywhere?
No. Rendering happens locally in the webview; the extension only talks to Polar, and only for the licence check.
Offline use?
A licence keeps working offline for 14 days after the last successful check; the check itself runs in the background and never blocks the studio.
Refunds?
If Pro isn't right for you, ask for a refund within 14 days of purchase with your Polar receipt (or open an issue) and it will be refunded in full.
Something is broken.
Open an issue: https://github.com/rh9ak9dnj-svg/snapcode-studio/issues — please include your VS Code version, OS, and what you expected.
Building from source
npm install
npm test # 121 tests: normalisation, tokenizer, themes, layout, SVG, Polar parsing,
# plus host-activation, licence-recovery and webview DOM smoke tests against the real bundles
npm run build # esbuild bundles: dist/extension.js, media/studio.js and media/pdf.js
npm run package # build + npx @vscode/vsce package → snapcode-studio-0.2.0.vsix
Press F5 in VS Code to launch an Extension Development Host.
Connecting your own Polar account
The checkout URL and organization id are compiled in from environment variables, so a build is only a rebuild away from real payments:
export POLAR_ORGANIZATION_ID="<organization id from Polar → Settings → Identifiers>"
export POLAR_CHECKOUT_URL="https://polar.sh/<you>/<product>"
export POLAR_LICENSE_BENEFIT_ID="<optional benefit id, if you sell more than one licence product>"
npm run build
Without POLAR_ORGANIZATION_ID the extension still runs fully on the Free plan; Pro activation reports that the build is not connected to a licence yet, and the marketplace checkout button stays disabled instead of pretending to work.
npm run screenshots regenerates icon.png and every marketplace image by running the real render pipeline (SNAPCODE_ASSET_DEBUG=1 also keeps the composed SVG next to each PNG).
Known limitations
- Quick Copy opens and focuses the studio for a moment, because VS Code's clipboard can only receive an image from a webview. The image is copied automatically — there is no shutter to press, and you can keep tweaking in the studio that is already open.
- The rendered font is the one installed on your machine; a font you only configured but never installed cannot be drawn.
- Very long lines are not wrapped (that would change your code); the image simply gets wider. An exact social size scales the whole card down to fit.
- PDF export embeds a 2× raster of the snapshot, which keeps text crisp at print size, while SVG export is fully vector. The PDF library is downloaded from the extension itself the first time you use it, so it never slows down opening the studio.
Licence
MIT. See LICENSE.