🎁 100 free AI Toolkit licenses – apply by August 15.Learn more

Export Markdown via REST API

Available in Start planBetav2.39.1

The Markdown export API converts Tiptap JSON documents into Markdown files.

Review the postman collection

You can also experiment with the Document Conversion API by heading over to our Postman Collection.

Choose your region

The default endpoint api.tiptap.dev is served from the EU region. The conversion service is also available in the US region at api-us.tiptap.dev.

Export Markdown

POST /v2/convert/export/markdown

The /v2/convert/export/markdown endpoint converts Tiptap JSON documents into Markdown format. Send a POST request with your document as a JSON body to receive a downloadable Markdown file.

Example (cURL)

curl --output document.md -X POST "https://api.tiptap.dev/v2/convert/export/markdown" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "doc": "{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Hello from Tiptap!\"}]}]}"
    }'

Subscription required

This endpoint requires a valid Tiptap subscription. For more details review our pricing page.

Required headers

NameDescription
AuthorizationThe JWT token to authenticate the request. Example: Bearer your-jwt-token
Content-TypeMust be application/json

Body

NameTypeDescriptionRequired
docStringTiptap JSON document as a stringYes

Response

On success the API returns the Markdown file as a text download:

  • Status: 200 OK
  • Content-Type: text/markdown; charset=utf-8
  • Content-Disposition: attachment; filename=export-{timestamp}.md

Error responses

StatusCodeDescription
400NO_DOCUMENT_PROVIDEDNo document was provided in the body
422FAILED_TO_PARSE_JSON_INPUTFailed to parse JSON inputs
422FAILED_TO_PARSE_MARKDOWN_FILEFailed to export Markdown

Support & Limitations

The REST API uses the same Markdown conversion as the editor extension, so the supported feature set is identical. Markdown export converts Tiptap content to CommonMark-compatible Markdown. Unlike DOCX, Markdown has no concept of rich styling, page layout, or complex table formatting.

FeatureSupport
Text contentβœ“ Paragraphs, headings (1–6), hard breaks
Inline formattingβœ“ Bold, italic, strikethrough, inline code
Block elementsβœ“ Blockquotes, code blocks (fenced with language), horizontal rules
Listsβœ“ Bullet lists, ordered lists, task lists, nested lists
Tablesβœ“ Basic pipe-syntax tables (single header row, no merged cells)
Linksβœ“ Hyperlinks with text and URL
Imagesβœ“ Image references with alt text (no dimensions)
Underlineβœ“ Custom syntax (++text++, non-standard)
Highlightβœ“ Custom syntax (==text==, non-standard)
Text color / Fontβœ— No Markdown syntax for colors, font family, or font size
Text alignmentβœ— No Markdown syntax
Spacing / Indentationβœ— No Markdown syntax
Merged cellsβœ— Markdown tables don't support colspan or rowspan
Headers & Footersβœ— No concept in Markdown
Page layoutβœ— No page breaks, sections, or page size
Math~ Extension-dependent ($...$ syntax if math extension is configured)
Footnotes & Endnotesβœ— Not supported in CommonMark

For the full DOCX feature comparison, see the Supported features matrix.