Code to Image Converter
Turn a code snippet into a shareable picture with colours, a window frame, line numbers and a gradient background.
How to turn code into an image
Paste your code
Type or paste a snippet of up to 200 lines.
Choose a theme
Pick the colours that suit your slide, post or document.
Style the window
Set the text size and spacing, and choose window buttons and line numbers.
Download
Save it as a PNG, or as a smaller JPG.
When to use Code to Image Converter
You want to share a snippet of code in a post, slide or document as a clean picture.
A tutorial or tweet needs a code sample with colours, a window frame and line numbers.
Tips for a better Code to Image Converter result
Paste up to 200 lines, pick a theme that suits your slide or page, and set the text size and spacing.
Turn on line numbers when you plan to refer to specific lines.
Code to Image Converter: limits and what to check
Colouring uses general rules for comments, strings, numbers and keywords, so a few languages may not be coloured perfectly.
A picture of code cannot be copied by readers, so also share the text when people need to run it.
About Code to Image Converter
Make a clean picture of code for a post, a slide or a document. Comments, strings, numbers and common keywords get their own colours in most languages, and the picture gets a soft shadow and a gradient behind it.
FAQs
Is my text uploaded anywhere?
No. The text is turned into a picture on your device, so your text stays private.
Which languages does it colour?
It uses general rules for comments, strings, numbers and keywords, so it suits JavaScript, Python, Java, C, Rust, SQL and many others, though not every language perfectly.
Can I make it transparent?
Not at the moment. Set Space around to 0 and crop to the window instead.
Is there a size limit?
Up to 200 lines. For more, split the code into several pictures.