Code to Image (Screenshot)
Convert code snippets to beautiful shareable PNG images.
About this tool
Code to Image renders your code inside a styled macOS-style window frame and exports it as a PNG — entirely in the browser, with no server uploads. Choose from five themes (Monokai Dark, Light, Dracula, Nord, One Dark), toggle line numbers, adjust font size and padding, and pick a solid color, gradient, or transparent background. A regex-based syntax highlighter colours keywords, strings, and comments for JavaScript, Python, TypeScript, CSS, HTML, SQL, and Bash. Perfect for blog posts, social media, or documentation.
How to use
- 1 Paste your code into the editor.
- 2 Select your language, theme, and background style.
- 3 Adjust font size, padding, and toggle line numbers.
- 4 Preview updates live in the window frame below.
- 5 Click Download PNG to save the image.
Frequently Asked Questions
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text or files — runs offline in your browser.
Encode or decode Base64 strings — works for text and files.
Format, validate, and minify JSON — with syntax error pinpointing.