Snipget.ai

Text typographic normalize

Exact
text_typographic_normalize

Deterministic and authoritative — the canonical answer for this input.

Convert smart typographic characters to ASCII equivalents. Replaces curly quotes, em/en dashes, ellipsis, and exotic spaces; removes zero-width characters and byte-order marks. Run this before feeding text to parsers that assume plain ASCII. Processing multiple inputs? Use `text_typographic_normalize_batch` to do up to 1000 in one call.

Parameters

textstringrequired

Text to normalize.

em_dash_to_double_hyphenbooleanoptional

Map em/horizontal-bar dashes to '--' instead of a single '-'.

Call it

curl -X POST https://api.snipget.ai/v1/text/typographic/normalize \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"“Smart” quotes — and an ellipsis…"}'

The Batch tab sends up to 1000 inputs in one call via /v1/text/typographic/normalize/batch.

Example response

{
  "input": "“Smart” quotes — and an ellipsis…",
  "normalized": "\"Smart\" quotes - and an ellipsis...",
  "replacements_made": 4,
  "replacement_breakdown": {
    "“": 1,
    "”": 1,
    "—": 1,
    "…": 1
  },
  "length_before": 33,
  "length_after": 35
}

FAQ

What problem does this fix?

Word processors and websites quietly insert 'smart' characters: curly quotes, long dashes, an ellipsis symbol, and odd spaces. These break CSV imports, search, and parsers that expect plain ASCII. This swaps them for plain equivalents like straight quotes, a hyphen, and three dots.

What gets changed?

Curly quotes become straight quotes, em and en dashes become hyphens, the ellipsis becomes three dots, and exotic or non-breaking spaces become normal spaces. Zero-width characters and byte-order marks are removed.

Can I make em dashes into a double hyphen?

Yes. Set em_dash_to_double_hyphen to render a long dash as '--' instead of a single hyphen, which some style guides prefer.

How is this different from whitespace normalize?

This focuses on swapping fancy characters for ASCII while keeping your spacing and line breaks. Whitespace normalize instead collapses all spacing into single spaces. They are often used together.

Is it consistent?

Yes. It is deterministic and authoritative: the same text always produces the same cleaned result, and it reports how many replacements it made.

Related tools