Code Screenshot Generator
Paste a snippet, pick a language and theme, and export a crisp, beautiful PNG with syntax highlighting and macOS-style window chrome — perfect for tweets, docs and slides. Everything runs in your browser.
About this tool
Renders your snippet straight to a <canvas> at 2x resolution with a hand-rolled syntax highlighter — keywords, strings, numbers and comments are tokenized per language, so JavaScript, TypeScript, Python, Go, Rust, SQL, HTML, CSS, Bash and JSON all get sensible colors. The window gets rounded corners, a soft shadow and a gradient backdrop, so the exported PNG looks polished with zero editing.
Your code never leaves the page — there is no server, no upload, and no tracking of tool inputs. Tabs are converted to two spaces and very long lines widen the image, so keep lines under ~100 characters for the nicest result.