Wizard Toolbox Tool map Feedback
BETAStill being built. Things may break. Tell us

Code Screenshot

Drop a picture to put code on it

JPG, PNG and more · click to choose · or

Code Screenshot

Paste code, pick a theme and a background, and save a sharp picture of it for a slide, a post or your docs.

Colours and languages

The page opens Image Studio on its Code screenshot window (Make, Code screenshot in the studio). Paste or type your code and the preview follows. It is coloured by a small highlighter written for this site: keywords, strings, comments, numbers, function and type names and punctuation each get the theme's colour for them. Auto works out the language from clues in the code, such as def and a colon for Python or package and func for Go; if it guesses wrong, pick the language yourself. It knows JavaScript, TypeScript, Python, HTML, CSS, JSON, SQL, Bash, C, C++, C#, Java, Go, Rust, PHP, Ruby, Lua, GDScript and GLSL. It colours code the way an editor does as you type, without running or checking it, so a rare construct may come out plainer than in your editor.

The picture

The window, the shadow and the background are drawn letter by letter in JetBrains Mono, at the same places in the preview and the saved file, so the PNG matches what you see. Click a line number on the preview, or type the numbers, to highlight lines. 2x doubles every dimension, which keeps text crisp on phone and laptop screens; 4x is for print and big slides. Long lines are not wrapped: the picture grows wider to fit the longest line, so code reads as it does in an editor. If a line is very long, break it yourself, or tidy the code in the Code Formatter first.

SVG, copying, links and the studio

Save SVG saves the picture as real text with the font inside the file, so it stays sharp at any size and the code can still be selected. Copy picture puts the PNG on your clipboard to paste straight into a chat, a document or a slide. New picture opens it in the studio to add arrows, notes or a blur over a secret, and with a picture open, Add as a layer puts the code on it. The address bar keeps your code and every setting, so a bookmark or a link brings the same picture back.

Questions

Is my code uploaded?

No. The highlighting and the drawing happen in this page, on your device. Nothing is sent anywhere. Your code is kept only in the link in your address bar, so think before you share that link if the code is private.

Why are tabs shown as spaces?

Tabs line up to every fourth column, as most editors show them, and are drawn as spaces in the picture so every letter sits exactly on the grid.

Some characters look different in the picture

The font covers Latin letters, numbers and symbols. Other scripts and emoji come from your system's fonts, which are not the same width, so lines with them may not line up perfectly.

Can I make the picture a set size?

The size follows the code, the padding and the font size. For a wider picture, add padding; for a smaller one, use a smaller font size or 1x. Once it is a picture in the studio, Image, Canvas size and Image size set any size you like.

Your pictures never leave your device · nothing is uploaded