The em dash was mine before AI.
«—» is typography, not an AI watermark.
polytypo fixes typography in any text: it turns straight quotes into the locale's quotation marks, sets dashes and ellipses, and inserts no-break spaces. It supports 24 languages in JavaScript, Python, Go, Ruby and PHP, and gives byte-identical output in all five.
Using an AI coding agent? Give it the polytypo SKILL.md and ask it to set polytypo up in your project.
Try it
Paste your text. Pick a locale.
This is the real engine, running in your browser. Nothing you type is sent anywhere.
The call the form above is making, right now
Full call reference — Docs.
Proof
The same sentence. Six different, correct answers.
Every card below runs the exact same input string through transform(). Only the
locale changes; quote style, dash style, and spacing all follow.
Input, unchanged
English (US) opens with a curly double quote and a tight em dash. British English swaps the
primary and secondary levels round, with a spaced en dash instead. German lowers the opening
quote. Swiss German turns it into guillemets pointing outward. French puts a no-break space
inside its guillemets (U+00A0) and a narrow one before ! ? ; (U+202F). Russian
pairs French-style guillemets with German's low-high secondary marks. Every one of these is
correct — in exactly one place.
Quotes, dashes and spacing for every language, with the sources behind each rule — typography rules by language. To add one, see Contribute.
Questions
Common questions
How do I turn straight quotes into curly quotes automatically?
Call transform(text, { locale }). It replaces straight quotes with the locale's
primary and secondary pairs, for example “…” in en-US and „…“ in
de-DE, and resolves nesting.
Which languages does polytypo support?
24 locales, each backed by cited style guides. See typography rules by language.
Can it typeset Markdown, MDX, HTML and YAML without breaking code?
Yes. The markdown, html and yaml modes change only
prose and leave tags, attributes, code spans, code blocks and URLs alone. See
modes.
Does running it twice change the text again?
No. transform(transform(x)) equals transform(x) in every runtime;
see idempotency.
Is the em dash a sign of AI-written text?
No. It is standard punctuation in several style guides, and polytypo sets it only where a locale's guide prescribes it. Read the manifesto.
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>