Highlighting…
Help Us Improve
—
(—)
Code to image converter
Turn code into a picture—syntax highlighting, themes, PNG download. Local-first. No signup.
What is a code to image converter?
Code to image features
Syntax highlighting
Shiki themes color the snippet before you export.
Share-ready frame
Optional window chrome, line numbers, padding, and font size.
PNG download
Export 1×, 2×, or 3× so text stays sharp in slides.
Copy the picture
Put the PNG on the clipboard for chat or docs.
How to turn code into a picture
Paste your code
Choose the language so highlighting matches the syntax.
Style the frame
Pick a theme, font size, padding, and whether to show the window bar.
Download or copy
Save a PNG or copy the picture for a post or slide.
Tips for code pictures
- 01
Keep snippets short
A tight function reads better in a social image than a whole file.
- 02
Use 2× for slides
Higher export scale keeps monospace text crisp when the image is scaled down.
- 03
Match the theme to the slide
GitHub Light sits on white decks; dark themes suit dark posts.
- 04
HTML pages are a different tool
For a snapshot of HTML markup rendered as a page, use HTML to PNG Converter.
Great for
Social posts
Share a readable snippet without a raw code block.
Talks and docs
Drop a PNG into slides or a README preview.
Reviews
Highlight one function when discussing a change.
Why export code here
Local-first
Snippets never leave the browser for this tool.
Free
Unlimited pictures with no signup and no watermark.
Sharp PNG
Lossless export keeps syntax colors and text edges clean.
Theme control
Switch light and dark highlight themes before you export.
Technical notes
- Highlighter
- Shiki (TextMate grammars) with a fixed set of languages and themes.
- Capture
- html-to-image renders the framed snippet to PNG at 1×, 2×, or 3×.
- Font
- System monospace so export does not depend on a remote font file.
- Privacy
- Client-side only—no network upload of your code.
Sources & References
“A beautiful yet powerful syntax highlighter.”
Shiki: TextMate-based highlighter that colors the snippet before it is captured as a picture. shiki.style/
“Generates an image from a DOM node using HTML5 canvas and SVG.”
html-to-image: Client-side capture used to download or copy the framed code as PNG. github.com/bubkoo/html-to-image
“Portable Network Graphics is a raster-graphics file format that supports lossless data compression.”
Portable Network Graphics (PNG): PNG keeps sharp monospace text and syntax colors better than a lossy photo format. en.wikipedia.org/wiki/Portable_Network_Graphics