Code to Image
Turn code into a clean PNG with syntax colours, a window frame and a background, for posts, slides and docs.
Runs in your browser. Files stay on this device.Built with highlight.js (BSD-3-Clause)
Open Code to Image
Free, no account, no watermark and no daily limit.
How to use Code to Image
- 1Paste code or drop a source file.
- 2Pick the language, theme, background and text size.
- 3Download the PNG.
Questions
Which languages are coloured?
JavaScript, TypeScript, Python, Go, Rust, Java, Kotlin, Swift, C, C++, C#, PHP, Ruby, Shell, SQL, HTML, CSS, JSON, YAML and Markdown. Detect picks one for you.
Can the background be see-through?
Yes. Pick None and the PNG has a transparent background, with only the code card drawn.
How sharp is the image?
Sharpness 2× draws at twice the size, which looks crisp on most screens and slides. Use 3× for print.
Is my code uploaded?
No. The image is drawn in your browser.
Is it free?
Yes. No account, no watermark and no daily limit.
Related tools
- DeveloperBase64 EncoderEncode text or files to Base64 and decode it back, with URL-safe and data URL options.
- DeveloperDiff CheckerCompare two texts and see what was added and removed, line by line or word by word, and download a patch.
- DeveloperHash GeneratorGet the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of text or any file, and check it against a hash you were given.
- DeveloperJSON FormatterFormat, check and minify JSON, with the exact line of any error.
- DeveloperJWT DecoderRead the header and claims of a JSON Web Token, see when it expires, and check an HMAC signature.
- DeveloperRegex TesterTest JavaScript regular expressions live: every match highlighted, capture groups in a table, and a replace preview.