📸

Code Screenshot

8 themes

Turn your code into a beautiful, shareable image. Pick a theme, gradient background, and font size — then export.

Code
Theme
Background
Sunset
Options
Font size
Padding
Preview
index.ts
1
async function fetchUser(id: string) {
2
try {
3
const response = await fetch(`/api/users/${id}`);
4
5
if (!response.ok) {
6
throw new Error(`HTTP ${response.status}`);
7
}
8
9
const user = await response.json();
10
return {
11
id: user.id,
12
name: user.name,
13
email: user.email,
14
createdAt: new Date(user.created_at),
15
};
16
} catch (error) {
17
console.error("Failed to fetch user:", error);
18
return null;
19
}
20
}
use2codingtools.com
Lines20
Chars455
ThemeOne Dark
Font14px

💡 For PNG export, install: npm install dom-to-image-more

🎨
8 Themes
One Dark, Dracula, GitHub, Monokai, Night Owl, Solarized, Tokyo Night, Catppuccin.
🌈
8 Backgrounds
Transparent or gradient backgrounds — Sunset, Ocean, Aurora, Lava and more.
✨
Syntax Highlight
Auto-highlights keywords, strings, numbers, and comments across major languages.
📸
PNG Export
Export high-res 2x screenshot. Requires dom-to-image-more package.