Code Screenshot Maker
Turn code into a syntax-highlighted image and copy it straight out
Loadingโฆ
Was this tool helpful?
About this tool
Paste code and get a syntax-highlighted image of it. Nine themes, gradient or transparent backgrounds, macOS and Windows window decorations, line numbers and per-line highlighting are all available, and the result can be downloaded or copied straight to the clipboard for Slack or a blog post. The preview on screen is the exported image itself, so there are no surprises after you download.
How to use
- Paste your code. The language is detected from the content and file name.
- Pick a theme and background, then adjust padding and font size.
- To emphasise lines, type something like 3,5-7.
- Change the filename, pick a macOS, Windows, or no window chrome, and set line numbers and font.
- Press Copy image, or download the PNG at 1x, 2x or 3x.
- Turn the finished setup into a link with "Share" and send it to someone else as-is.
Frequently asked questions
- What do 2x and 3x mean?
- They draw the same picture at double or triple resolution. Use 2x or more for retina screens and presentation slides; 1x is plenty inside a blog post. The type stays the same size, the pixels just get denser.
- Copy image does nothing.
- Your browser does not support writing images to the clipboard - some Safari versions and older browsers behave this way. Use the PNG download instead.
- My non-Latin comments look wrong.
- The chosen font does not cover those characters. JetBrains Mono and Fira Code are Latin-only, so anything else falls back to a system font. For code with a lot of CJK text, choose the system monospace option.
- What goes into the share link?
- Your code and every setting, encoded after the # in the URL. Browsers never send that part to a server, so it stays out of access logs - but the link itself contains the code, so do not share anything secret.
- Why draw it instead of capturing the screen?
- Screen-capture approaches render differently in each browser, and if the web font is not ready when the shot is taken, the typeface changes entirely. Drawing straight onto a canvas produces the same image everywhere.
- Which programming languages are supported?
- 19 languages: JavaScript, TypeScript, TSX, Python, Java, Kotlin, Swift, Go, Rust, C++, C#, PHP, SQL, JSON, YAML, HTML, CSS, Bash, and Markdown. If you paste something outside that list, auto-detection falls back to the closest match.
- How many themes are there and what can I pick?
- Nine total: six dark themes (Dracula, Nord, One Dark Pro, GitHub Dark, Monokai, Catppuccin Mocha) and three light themes (GitHub Light, Vitesse Light, Solarized Light).
- Why do I need to enter a filename?
- It appears in the title bar when you choose the macOS or Windows window chrome, and it is also used to guess the language from the file extension. The name you type here also becomes the downloaded PNG's file name.
- What format is the downloaded image?
- A PNG file. Its name comes from what you typed in the filename field (minus the extension), and you can choose 1x, 2x, or 3x scale to set the resolution.
Your code is processed only in the browser and never sent to a server. Highlighting grammars and themes are fetched on demand, so the first time you pick a new language or theme there may be a brief wait.