Color common JavaScript, TypeScript, HTML, CSS, JSON, Python, or SQL tokens for display.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Language-specific regular-expression patterns wrap keywords, strings, numbers, comments, tags, and properties in theme classes after HTML escaping. The result is presentation markup, not a parser or validator.
const name = 'World';
console.log(`Hello ${name}`);
<pre style="background:#1e1e1e;color:#d4d4d4;padding:16px;border-radius:8px;overflow-x:auto;font-family:'Fira Code',monospace;font-size:14px;line-height:1.5;"><style>.kw{color:#569cd6}.str{color:#ce9178}.num{color:#b5cea8}.cmt{color:#6a9955;font-style:italic}.tag{color:#569cd6}.attr{color:#9cdcfe}.sel{color:#569cd6}.prop{color:#9cdcfe}.val{color:#ce9178}</style><code><span class="kw">const</span> name = <span class="str">'World'</span>;
console.log(<span class="str">`Hello ${name}`</span>);</code></pre>
Documentation pages, browser editors, and README generators highlight snippets.