Alpha

Code that looks right
wherever it renders.

One semantic tokenizer for browser highlights, accessible HTML, JSON tooling, and ANSI terminals.

Browser Node.js Deno Bun Next.js Edge SSR
type Token = { type: string; start: number; end: number };

class Highlighter {
  private cache = new Map<string, Token[]>();

  constructor(private language = 'typescript') {}

  highlight(src: string): Token[] {
    const hit = this.cache.get(src);
    if (hit) return hit;
    const toks = tokenize(this.language, src);
    this.cache.set(src, toks);
    return toks;
  }
}

Try it live

Edit the code or pick a language — highlighted with the real tokenizer.

sample.javascript0 tokens

Benchmarks

Fast by design

End-to-end highlighting (tokenize + HTML) over 101 real-world samples.

14×faster than Shiki
1.40Mtokens / sec
50.1mstotal, 92 files
3.96MB / sec
EngineTime (lower ↓)RelativeThroughputFiles
sugar-high23.4ms4.08 MB/s27
Prism47.1ms4.19 MB/s90
@opentf/syntax-highlighter50.1ms3.96 MB/s92
highlight.js80.9ms2.28 MB/s81
lowlight97.3ms1.81 MB/s77
Shiki715.2ms0.28 MB/s92

Each engine ran the files it supports; pairs share identical file sets. Median of 8 runs on the esdev runtime, 2026-09-20. starry-night is unreachable from this registry.

One inputsource code
→
One tokenizersemantic tokens
→
Any rendererweb · HTML · JSON · ANSI
◇

Semantic by design

Tokens carry meaning beyond color: headings, links, delimiters, emphasis, and more.

Explore renderers →
⌁

Native when possible

Use CSS Custom Highlights in the browser and avoid a forest of syntax spans.

Read the approach →
↗

Built for every surface

Keep output consistent across a live editor, server render, developer tool, and terminal.

Start integrating →

Bring your code to every surface.

Read the quickstart →