Code screenshot generator (Carbon-like) — syntax highlight, beautiful gradient backgrounds, window chrome, export PNG/SVG for X / blog covers.
- Runs locally
- Category Image
- Best for Getting images to the right size, format, or weight before publishing.
Click a line number to highlight that line.
What this tool does
A polished alternative to carbon.now.sh that runs 100% in your browser. Paste any code, pick one of 15 supported languages (JavaScript / TypeScript / JSX / TSX / Python / Go / Rust / Java / C++ / C# / SQL / Bash / HTML / CSS / JSON), choose from 12 editor themes (Dracula, Monokai, One Dark, GitHub Dark, GitHub Light, Solarized Dark / Light, Nord, Tokyo Night, Night Owl, Cobalt, Aurora Cyan), 12 gradient backgrounds, three window-chrome styles (macOS dots / minimal / none), four monospace fonts, adjustable padding and font size, click any line number to highlight that line. Export as 2x PNG, SVG, or copy directly to clipboard. No data leaves your browser.
Tool details
- Input
- Files + Text + Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Download
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 45 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Image · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Code Screenshot Generator fits into your work
Use it while preparing images for websites, stores, social posts, forms, or handoff packages.
Image jobs
- Getting images to the right size, format, or weight before publishing.
- Checking privacy-sensitive EXIF and metadata before sharing a photo.
- Creating publish-ready variants without uploading private assets.
Image checks
- Resize to the real display size before compressing.
- Review transparency, animation, and color profile changes after conversion.
- Strip or review metadata when the image contains private context.
Good next steps
These links move the current task into a more complete workflow.
- 1 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open
- 2 Markdown to HTML Convert Markdown to clean HTML — headings, lists, code, links, images, tables — instant live preview, browser-only Open
- 3 Regex Visualizer Regex visualizer — see your pattern as a railroad diagram + matching state machine, with capture groups highlighted. Open
Real-world use cases
Make a Twitter / X cover for a bug-fix tweet
You shipped a one-liner fix for a memory leak and want to share it on X. Paste the before/after snippet, switch to TypeScript, pick Tokyo Night + the Aurora gradient, click Download PNG, and drop it into the tweet draft. The 2x rasterized PNG renders crisp on retina and on Twitter's own card preview. No screenshot tool, no manual cropping, no Chrome window chrome bleeding into the frame.
Blog post hero image for a "how the React compiler works" article
You're writing a Medium / dev.to post and need a hero illustration. Paste the AST snippet, pick One Dark, set padding to 96 px, hide the macOS dots for a cleaner look, export PNG at 2x. The result is a self-contained image that looks identical on light and dark blog themes because the gradient panel carries its own background.
Code-review comment with a highlighted offending line
You spotted an off-by-one in a PR but want to be friendly about it. Paste the relevant 8 lines, click the line number of the bug to highlight it, copy the image, paste into the GitHub review comment. Reviewer sees exactly which line you mean, no "look at line 47-ish" gymnastics, no scrolling through the diff to find the spot.
Talk slide showing 3-language comparison
You're giving a Lightning Talk on memory models in Go vs Rust vs C++. Paste each snippet, swap the language and the theme, save 3 PNGs in a row, paste into Keynote / PowerPoint. Audience sees real syntax highlighting, not a screenshot of your IDE with the familiar-but-distracting chrome.
README cover for a new open-source library
GitHub's README markdown rendering is plain — your "first example" block looks like every other repo. Generate a polished PNG of the 5-line "hello world" usage, commit it to /docs/cover.png, embed at the top of README. First impression jumps from "another util" to "looks like someone cares". Costs you 30 seconds.
Documentation site code example without a build step
Your static site (Astro / Hugo / mdBook) doesn't have a syntax highlighter set up and you don't want to add one for 3 snippets. Generate each example as an SVG, commit them to /assets/code/, and embed via <img>. Zero runtime cost on the docs page, perfect rendering, no theme-switch race condition.
Common pitfalls
Picking a low-contrast theme (Solarized Light on a pastel gradient) and then complaining that the screenshot is hard to read on a phone. If the OLED phone preview looks washed out, switch to a darker theme or pick the Midnight / Carbon background instead.
Forgetting that JSX requires the JSX or TSX language preset — choosing plain "JavaScript" will color the angle brackets as comparison operators instead of as tags. Same trap for TypeScript generics inside .ts files; pick TS, not JS.
Pasting a 200-line snippet and being surprised the PNG is huge. The image scales with the longest line and total line count. For readability cap each shot at ~40 lines and split logically — viewers won't read past 20 anyway.
Using the "Copy image" button in a non-HTTPS context and getting a silent failure. ClipboardItem write requires a secure origin (https or localhost). Fall back to Download PNG → drag into the destination if you're on an http:// preview.
Hiding line numbers and then asking your reviewer to "look at line 7". With line numbers off you took the address system away — turn them back on whenever you plan to refer to a specific line by number.
Privacy
Your code stays in this browser tab. The textarea content is never put into the URL (sharing only carries theme / language / background / chrome / padding / font-size settings) and never sent to a server. Rendering, tokenizing, SVG building, and PNG rasterization all happen on your machine. Safe to paste internal API names, customer identifiers, or pre-publish source. The only outbound request the page makes is for the Google Fonts stylesheet (only when you pick JetBrains / Fira / Source Code Pro) — switch to Monaco to stay fully offline.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Age Difference Calculator The exact gap between two birthdays — years/months/days, percentage, and the date one person is twice the other's age — browser-only
- AI Eval Planner Generate eval cases, pass criteria, and edge cases from an AI feature, risks, and user path.