Code Screenshot
Turn a code snippet into a clean PNG screenshot, drawn in your browser.
Highlighting is deliberately simple — keywords, strings and comments get one color each. The screenshot is drawn on a canvas in your browser; nothing is uploaded.
How to use it
- Paste the code into the panel.
- Pick the language — JavaScript, TypeScript, Python, JSON, HTML, CSS or plain text.
- Choose a theme (dark or light) and a font size, and switch the macOS window dots on or off.
- The preview redraws itself as you type. Line numbers are added in a faint gutter on the left.
- Press Download to save the canvas as a PNG.
Common use cases
- Sharing a snippet in a ticket or chat — a picture reads better than fenced code in plain text.
- Slides and docs — drop a consistent-looking code image into a deck or a README.
- Social posts about code — wrap a short snippet in a window frame that looks intentional.
- Before and after shots — render two versions of a function and put them side by side.
Why it stays private
The snippet is tokenized and drawn onto a canvas in your browser. Nothing is uploaded, no syntax service is called, and the code never leaves your device.
FAQ
Q: How accurate is the highlighting? A: It is deliberately simple: keywords, strings, comments and numbers each get one color. There is no full parser, so edge cases like regexes inside strings or template literals with nested expressions are not colored precisely.
Q: Which fonts are used? A: A monospace stack that starts with JetBrains Mono and falls back to the system monospace font. If the family is missing, the screenshot still renders with the fallback.
Q: Is there a size limit? A: Long snippets work, but the canvas grows with the content, so very long files produce very tall images. A few hundred lines is a comfortable range.
Q: Can I change the padding or colors? A: Not in this version. Padding and the palette are fixed so the output stays consistent; the theme, font size and window dots are the exposed controls.
Your data stays on this device
Code Screenshot runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.