📸

Code to Image

Convert code snippets to beautiful syntax-highlighted images for sharing on social media, presentations and documentation. Choose theme, font and padding. Free, browser-based.

💻 Developer Tools Free Browser-based
Tool
snippet.js

Why Share Code as an Image?

Code images are easier to share on social media, presentations and documentation where raw text formatting is lost. A beautifully styled code card with a gradient background and macOS-style window chrome makes your snippet instantly recognisable and visually polished.

Supported Languages

LanguageColour scheme applied
JavaScript / Python / PHPKeywords, strings, comments highlighted
CSSProperties, values, selectors
HTMLTags, attributes, values
Bash / SQL / JSONStructural token colouring
Plain textNo highlighting — plain white on dark

Tips for Great Code Cards

Keep snippets short (under 20 lines) for the clearest images. Choose a font size of 14–16px for social media sharing. Use the transparent background option when dropping the card onto a custom slide background.

Frequently Asked Questions