ZapKit

Code to image

Share code that looks good in posts, slides and docs: paste it, pick a theme and background, and download a crisp, highlighted image.

What is a code to image tool?

A code to image tool turns source code into a picture with syntax highlighting, a tidy window frame and a background, the polished code screenshots seen in developer posts, slides, tutorials and documentation.

Paste your code and the language is detected. Choose one of five editor themes, a gradient or plain background, font size, padding, export resolution, and whether to show line numbers and a window bar with a file name. The preview updates live and downloads as a PNG.

How to use the Code to image

  1. 1.Paste your code

    Up to 400 lines; the language is detected automatically.

  2. 2.Style it

    Theme, background, font size, padding, line numbers and window bar.

  3. 3.Download

    Save a PNG at 1×, 2× or 3× resolution.

Example: a tip for a developer post

A 9-line TypeScript debounce function:

Language
TypeScript (detected)
Theme / background
Night / Ocean gradient
Export
2× PNG with line numbers and debounce.ts in the title bar

A sharp, colourful snippet image ready to post or drop into slides.

Highlighting without uploading

Keywords, strings, comments, numbers, types and functions are coloured by a built-in highlighter for 15 languages, including JavaScript, TypeScript, Python, Java, C#, C and C++, Go, Rust, PHP, Ruby, SQL, shell, CSS, JSON and HTML. Auto-detection guesses the language from common patterns; pick it yourself if it guesses wrong.

2× export makes images sharp on phones and high-resolution screens. Because the code never leaves your device, it's safe for work snippets. Long lines are kept as written, so wrap them yourself.

Frequently asked questions

Why are some words the wrong colour?

The highlighter is simple and focused on looks; choose the language manually for better results.

Is the text in the image selectable?

No, it's a picture. Share the code as text too if people need to copy it.

Which resolution should I choose?

2× for social media and slides; 3× for print.

Is my code uploaded?

No. It's drawn locally.

More Creator tools