Code to Image
Paste a snippet and see it as a picture: comments, strings, numbers and keywords in a theme, inside a window or a plain card. Save a PNG for a slide or a post. The code stays in this browser. Paste a snippet, pick a language and a theme, and save a picture for a slide or a post. Randomize picks another snippet and another look. The code stays in this browser.
How it works
- Paste a snippet, or start from the sample, and choose the language.
- Pick a theme, a window or a plain card, and a backdrop.
- Save a PNG for a slide or a post. The snippet stays in this browser.
A picture of the code
The colours follow the groups an editor uses: comments, strings, numbers, keywords and names that are called. They make the shape of a snippet easy to see on a slide. They do not check that the code runs.
Frame, backdrop and size
A window adds the three dots and a title. Plain is only the card. The backdrop can be a flat colour or a gradient. Line numbers, padding and the type size change how the picture sits on a page.
Frequently asked questions
Does this run my code?
No. It draws the snippet with a visual theme. The colours do not mean the code was checked.
Which theme suits a light or a dark slide?
Dawn and Paper are light themes with dark text, so they sit well on white slides and in printed handouts. Night, Ocean, Forest and Amber are dark themes that stand out on dark slides or with a coloured Backdrop. For a projector in a bright room, a light theme and a larger Size are easier to read.
Which languages can I use?
JavaScript, TypeScript, Python, C#, Java, C++, Go, Rust, HTML, CSS, JSON, SQL and Bash are coloured. Anything else can be shown as plain text.
How do I put it on a slide?
Save a PNG and drop it into the slide or the post. A window frame and a gradient backdrop read well on a screen.
How do I take a screenshot of my code with syntax highlighting?
Paste the code instead of capturing the screen. Pick its Language, a Theme, a Window or Plain frame and a Backdrop, and turn on Line numbers. The PNG is drawn at twice its size, so it stays sharp on a slide, and long lines wrap instead of being cut off.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
前往編輯器