/api/v1/transform/typographyTypography transforms API
Smart quotes, em-dashes, ellipsis, NBSP.
POST /api/v1/transform/typography applies opt-in typography fixes to markdown — smart quotes, em-dashes, ellipsis, non-breaking spaces — while leaving fenced code untouched.
Overview
Apply opt-in typography fixes: smart quotes ↔ straight, em-dashes ↔ double hyphens, ellipsis ↔ three dots, non-breaking space → space, zero-width-space strip. Code fences and inline code stay untouched.
Request
Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:
curl -X POST 'https://trymarkdownviewer.com/api/v1/transform/typography' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown":"It'\''s “great” — really…","transforms":["smart-quotes-to-straight","em-dash-to-double-hyphen","ellipsis-to-three-dots"]}'Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| markdown | string | required | Markdown source. |
| transforms | TypographyOption[] | required | List of transforms to apply. |
Response
Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.
{
"data": {
"text": "It's \"great\" -- really...",
"replacements": 5
}
}Related endpoints
Try in browser
Free tools that run the same logic locally — no API key, no upload.
Try it
Send a real request against your account in the API playground. Errors there link straight back to the error reference.