Code to image
Turn a code snippet into a sharp, highlighted image for slides, docs and social posts.
Theme
Image
Missing a feature or found a bug in Code to image? Tell me on X (@_andrewtran) or by email.
How to use Code to image
- Paste your code and choose its language.
- Pick a theme, a background colour and whether to show the window bar.
- Download the PNG.
Questions and answers
Is my code sent anywhere?
No. The image is drawn by your browser on this device.
Why is the image so large?
It is drawn at twice the size it is shown, so the text stays sharp on high-density screens and when a slide is projected.
My language is not listed. What should I pick?
Pick the closest one: most languages with curly brackets look right as JavaScript or C. Plain text turns colouring off.
Related tools
Code playground
Try HTML, CSS and JavaScript together and see the result and the console, in a sealed sandbox.HTTP client
Send GET, POST, PUT, PATCH and DELETE requests from your browser and read the status, headers and body.Format JSON
Pretty-print, minify and validate JSON, with optional key sorting.Base64 encode and decode
Convert text to Base64 and back, with full Unicode support.