Code Screenshot
NewPaste code and generate a beautiful, shareable screenshot with syntax-aware coloring — a Carbon.sh alternative.
Code screenshot
Turn code into a shareable screenshot
Paste code, pick a theme, and download a clean PNG image — a Carbon.sh-style screenshot generator that runs entirely on an in-browser canvas.
Frequently Asked Questions
Is this using a real syntax highlighter like Prism or Shiki?
No — it uses a lightweight heuristic tokenizer built specifically for this tool that recognizes common keywords, quoted strings, and `//` comments. It won't be as precise as a full language-aware highlighter, but it's enough to make the screenshot readable and colorful.
What image format does the download produce?
A PNG, generated from the canvas via toDataURL, named after whatever you put in the window title field.
Does the canvas size adjust to my code automatically?
Yes — width scales with your longest line (within a 480–1200px range) and height scales with the number of lines, so short snippets don't get an oversized blank canvas.
Can I use this for languages other than JavaScript?
Yes, since the tokenizer only looks for generic patterns (comments, quoted strings, and a shared keyword list), it'll render any language reasonably, though keyword coloring is tuned mostly for JS/TS-like syntax.
Is my code sent anywhere to generate the image?
No — the entire image is rendered on an HTML canvas element in your browser and never leaves your machine.