We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
If this tool helped you, you can buy us a coffee ☕
Turn code snippets into beautiful screenshots in one click, with multi-language syntax highlighting and customizable themes.

Punycode Encoder & Decoder
An online converter for Internationalized Domain Names (IDNs) and ASCII formats, designed to process non-ASCII characters like Chinese domains.

JJEncode Encoder & Decoder | Online JS Obfuscator
Free online JJEncode tool for JavaScript obfuscation and deobfuscation. Easily encode JS for code protection or decode strings for security analysis.

VS Code Shortcuts Finder
Search VS Code keyboard shortcuts by function or key combination. Get cross-platform (Windows, Mac, Linux) mappings to boost your coding efficiency.

Unicode Encoder & Decoder
A tool for bidirectional conversion between text and Unicode escape sequences (such as \uXXXX format).

Punycode Encoder & Decoder
An online converter for Internationalized Domain Names (IDNs) and ASCII formats, designed to process non-ASCII characters like Chinese domains.

JJEncode Encoder & Decoder | Online JS Obfuscator
Free online JJEncode tool for JavaScript obfuscation and deobfuscation. Easily encode JS for code protection or decode strings for security analysis.

VS Code Shortcuts Finder
Search VS Code keyboard shortcuts by function or key combination. Get cross-platform (Windows, Mac, Linux) mappings to boost your coding efficiency.

Unicode Encoder & Decoder
A tool for bidirectional conversion between text and Unicode escape sequences (such as \uXXXX format).

AAEncode Encoder & Decoder - Obfuscate & Deobfuscate JS Online
Free online tool to encode JavaScript into the AAEncode obfuscated format or decode AAEncode strings back to readable JS code.
When would you need this?
Let's try this out with some real Python code. Suppose you want to share a script that plots a sine wave using matplotlib.
Step 1: Paste your code
Paste the following code into the "Code Content" input box:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)
plt.plot(x, y)
plt.title('Sine Wave')
plt.show()Step 2: Select the programming language
Click the "Language" dropdown menu and select "Python". The tool will automatically recognize the syntax and apply highlighting.
Step 3: Choose a theme
From the "Theme" dropdown, let's select "Monokai Pro". This is a popular dark theme that looks great for code presentation.
Step 4: Adjust the appearance
· Font Size: Keep the default 14px
· Background Color: Keep the theme default (dark gray)
· Show Line Numbers: Toggle the switch to "Yes"
· Border Radius: Set to 12px for softer edges
Step 5: Generate and save
Click the "Generate Screenshot" button. The tool will render a real-time preview on the right. You'll see the highlighted code, clear line numbers, gradient background, and rounded corners. Once you're satisfied, click "Download PNG" to save a high-res screenshot (around 800x400) to your device.
Interpreting the Result: The generated image automatically adapts its width to the code length and its height to the number of lines. In our screenshot, the code runs from lines 1 to 7, separated by a gray vertical line on the left. Keywords (like import) appear in purple, function names (like np.linspace) in blue, and strings in green. The overall visual is crisp and ready to be used as a blog illustration.
The tool outputs a PNG image that you can preview directly. Keep a few key points in mind:
Q1: What programming languages does this tool support?
A: We have built-in syntax highlighting for over 30 languages, including Python, JavaScript, TypeScript, Java, HTML/CSS, C++, Go, Rust, SQL, and more. If your language isn't listed, it might be a niche language; we recommend using the "Plain Text" mode in that case.
Q2: Can the generated image have a transparent background?
A: Yes. Select the "Transparent" option in the "Background Color" settings (or enter #00000000), and the background will become transparent, making it easy to overlay on other backgrounds. Note that transparent backgrounds might make code hard to read in dark mode, so pair it with a light theme.
Q3: How can I add a watermark to the screenshot?
A: Our tool does not add watermarks. If you need to protect your copyright, you can add a text watermark using other image editing tools after generating the screenshot. We recommend simply adding a small logo to the corner of the image.
Q4: Can I set a fixed size for the screenshot?
A: Currently, the tool uses an adaptive size, automatically generating the optimal width and height based on the code length and number of lines. If you need a uniform size (like 800x600), you can crop or scale the image using image editing software after downloading.
Q5: Can I use this on a mobile device?
A: Yes. Our page is mobile-responsive. However, because there is a lot of code input and multiple options, the experience is generally better on a tablet or desktop. Mobile browsers can still generate and download images without any issues.