Try it

Paste your text. See what changes.

This is the real engine, running in your browser. Open the Result tab and the typeset text appears in the same place.

Runs in your browser. Nothing you paste is sent anywhere.

The call the form above is making, right now

None of the options fall back to a default

A wrong or missing value throws its own error with a machine-readable code, rather than guessing what you meant.

Idempotent

Paste the output back into the input and nothing should change.

YAML values and colons

In yaml mode, a value written plainly cannot contain :  — YAML itself reads that as a nested mapping, and a document with one does not parse at all. polytypo declines such a line rather than rewrite text it could not read back, so it returns untouched even when its key is named in keys. Quote the value, or write it as a block scalar with |. A quoted value may contain colons freely, but not an escape (\" or ''): that would make the source and the content different strings, and the offsets this mode works in are source offsets.

Size

No hard size limit on transform() — ordinary prose runs at roughly 250K characters per second, so even a full novel pasted in typesets in a couple of seconds. Pathological input (long runs of alternating quote or dash characters with no real content between them) is measurably slower, since a couple of rules re-check their own output to guarantee idempotency — real text never has that shape, so this only matters if you're piping in machine-generated or adversarial input.

Already using polytypo? Add our badge

Two lines: a script tag and a span. No per-embed network call. Pick a language and a theme, then copy the code into your footer or credits. Embedding notes cover Content Security Policy. Sites with the badge are listed on Sites using polytypo.

<script async src="https://polytypo.dev/badge.js"></script>
<span data-polytypo-lang="en" data-polytypo-theme="light"></span>

Search runs in your browser. Nothing is sent anywhere.