Skip to content
POST
/api/v1/transform/typography

Typography 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

FieldTypeRequiredDescription
markdownstring
required
Markdown source.
transformsTypographyOption[]
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
  }
}

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.