Snapshot a JavaScript snippet
Input
const greeting = 'hello';
console.log(greeting);Sample output (illustrative)
Illustrative excerpt; live output is full SVG markup
<svg>…pasted code with hello.js title bar…</svg>Render pasted code as a portable SVG snapshot on a gradient canvas with five code themes, syntax highlighting modes, macOS/minimal/frameless window chrome, four monospace fonts, and fixed-width sizing with aspect-ratio control — entirely in your browser. Download the .svg for blogs, docs, and slides, hit PNG for a crisp 2x raster, or copy the markup straight into HTML. Output is deterministic text, so snapshots are reproducible and never uploaded.
| Accepted input | Source code or plain text up to 200 KB |
|---|---|
| Highlighting modes | JavaScript, TypeScript, Python, HTML, CSS, JSON, or Plain Text (no guessing — you pick) |
| Themes | GitHub Dark, GitHub Light, Dracula, One Dark, and Monokai |
| Frames & fonts | macOS, minimal, or no frame; System Mono, IBM Plex Mono, JetBrains Mono, or Fira Code, 12–24 px |
| Snapshot canvas | Six gradient backgrounds, 480–1400 px width, custom or 16:9 / 4:3 / 1:1 aspect, adjustable spacing |
| Output | Standalone SVG image (code-snapshot.svg) plus one-click 2x PNG download, copyable as markup |
| Max input size | 200 KB |
| Execution deadline | 2 s |
| Processing location | Browser-only: pasted input is not uploaded |
Input
const greeting = 'hello';
console.log(greeting);Sample output (illustrative)
Illustrative excerpt; live output is full SVG markup
<svg>…pasted code with hello.js title bar…</svg>Input
def greet(name):
return f'hello {name}'Sample output (illustrative)
Illustrative excerpt; live output is full SVG markup
<svg>…light-theme code, no chrome…</svg>Input beyond 400 lines is cut to the first 400 lines, and lines longer than 200 characters are shortened, each with a visible warning, so the SVG stays a readable image instead of a megapixel-wide file.
Width is a minimum canvas size, not a clip box: when code needs more room, the canvas expands so every line renders in full. Only lines beyond 200 characters hit the safety cap, with a warning.
Custom height sizes to content. A fixed ratio (16:9, 4:3, 1:1) centers the card in the ratio box, and the canvas grows taller if the code needs more room — the card is never clipped.
There is no language detection to misfire: JavaScript, TypeScript, Python, HTML, CSS, and JSON highlight per-mode token rules, while Plain Text renders as clean single-color monospace.
The engine output is standalone SVG markup: infinitely scalable and tiny. The PNG button rasterizes that same render locally at 2x for blogs that only accept pixels — use SVG wherever the host allows it.
Character width is estimated at 0.6 × font size, so exotic glyphs or emoji may measure slightly wider than drawn. Fixed-width code in common monospace fonts aligns as expected.
SVG is text, so the pure tool engine can generate and test it deterministically without canvas or DOM access. The workspace adds a one-click PNG button that rasterizes the snapshot locally at 2x scale for hosts that only accept pixels — nothing is uploaded either way.
Yes — pick the mode matching your snippet: JavaScript, TypeScript, Python, HTML, CSS, JSON, or Plain Text for unhighlighted monospace. The mode is explicit, so highlighting can never misfire on detection.
Code panel: theme (GitHub Dark, GitHub Light, Dracula, One Dark, Monokai), mode, frame (macOS, minimal, none), font (System Mono, IBM Plex Mono, JetBrains Mono, Fira Code), font size 12–24, line numbers, title, and inner padding. Snapshot panel: gradient background, width 480–1400, aspect ratio, and vertical/horizontal space.
Download code-snapshot.svg and upload it like any image, or copy the output and paste the markup into HTML. Because the SVG is standalone with inline colors and fonts, it renders without external assets.
Input is capped at 200 KB. Rendering truncates beyond 400 lines and 200 characters per line with explicit warnings; shorter long lines simply widen the canvas, keeping every snapshot a readable, reasonably sized image.