Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

Code to Image — Beautiful Code Screenshots

Paste a snippet and get a polished code screenshot in seconds: syntax highlighting for JavaScript, TypeScript, Python, CSS, HTML, JSON, SQL, Bash, Go and PHP, a choice of themes, a window frame with a file name, a gradient or transparent background, padding and line numbers. Download a sharp PNG (up to 3×) or SVG, or copy the image straight to your clipboard.

Aktualisiert am

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: Code to Image

  1. Paste your code — or try the Sample. The language is detected automatically, or pick it.
  2. Choose a theme, a background and a window style, and type a file name for the title bar.
  3. Adjust padding and font size; turn on line numbers if you will refer to them.
  4. Download a PNG (2× is sharp on retina screens and social media), an SVG for docs, or Copy image and paste it into Slack, X or a slide.

Why share code as an image?

On social media and in slides, code as text loses its formatting and colors. A code image keeps the indentation, highlighting and layout exactly as you intended, looks good in a feed and can’t be mangled by a word processor. For documentation people will copy from, keep using text code blocks — and add the image only as an illustration.

How it is drawn

The snippet is highlighted by a small built-in tokenizer — comments, strings, numbers, keywords, functions and properties for ten common languages — and painted onto a canvas with your system’s monospace font. PNG export redraws it at 1×, 2× or 3× so it stays crisp; SVG export keeps the text as text, so it scales to any size and stays searchable. Everything happens in your browser.

Related: JavaScript Formatter, HTML Formatter, CSS Gradient Generator.

Auch gesucht als: code screenshot, code snippet image, code image generator, beautiful code screenshots, code to png, syntax highlighted image, share code as image.

Passende Tools zu: Code to Image

  • CSS Formatter — Turn a minified stylesheet into readable CSS with one property per line and properly nested @media blocks.
  • JSON Formatierer — Füge JSON ein, um es zu formatieren, zu minifizieren oder zu prüfen.
  • Markdown Editor — Write Markdown with a side-by-side live preview, a formatting toolbar and keyboard shortcuts.
  • OG-Bildgenerator — Erstelle in Sekundenschnelle ein professionelles Vorschaubild für Links auf Facebook, LinkedIn, X, Slack und WhatsApp – wähle eine Vorlage aus, gib deinen Titel ein, füge ein Logo hinzu und lade dann die PNG-Datei sowie die passenden Meta-Tags herunter.

Häufige Fragen

What size should a code image be for social media?
Use the 2× PNG: it stays sharp on retina screens and when platforms recompress it. Keep snippets short — about 10–25 lines read well in a feed.
Can I get a transparent background?
Yes — choose the Transparent background. The PNG keeps transparency around the window, which is handy for slides with their own background.
Which languages are highlighted?
JavaScript, TypeScript, Python, CSS, HTML, JSON, SQL, Bash, Go and PHP. Anything else can be shown as plain text in any theme.
Is my code uploaded?
No. Highlighting and rendering happen in your browser; nothing is sent to a server.
Kann ich Code to Image als Web-App installieren und offline nutzen?
Ja. Code to Image ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools