Skip to content
HALOWERK

Formatwerk

markdown to docx

Parses GitHub-flavoured Markdown (marked 18) into native Word content with the docx library: heading styles (taken from your template by their built-in names, so German style ids work), real numbered/bulleted lists that restart per list, tables with header row and alignment, monospaced code, quotes, http/https/mailto links. A template DOCX supplies styles.xml and, unless overridden, page size and margins. Images only from data: URIs; nothing is fetched. ODT/PDF are not produced here.

POST https://format.halowerk.com/v1/markdown-to-docx

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
markdownstringYes
titlestringNo
authorstringNo
subjectstringNo
template_docx_base64stringNoOptional reference DOCX whose styles (and page setup) are used.
page_sizestringNo
landscapebooleanNo
margin_mmobjectNoPage margins in millimetres.
fontstringNoBody font when no template is given.
font_size_ptnumberNo
header_textstringNo
footer_textstringNoFooter with {page}/{pages}; empty string for none. Default "Page {page} of {pages}".
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "markdown"
  ],
  "properties": {
    "markdown": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500000
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "author": {
      "type": "string",
      "maxLength": 120
    },
    "subject": {
      "type": "string",
      "maxLength": 200
    },
    "template_docx_base64": {
      "type": "string",
      "maxLength": 14000000,
      "description": "Optional reference DOCX whose styles (and page setup) are used."
    },
    "page_size": {
      "type": "string",
      "enum": [
        "A4",
        "A5",
        "Letter",
        "Legal"
      ]
    },
    "landscape": {
      "type": "boolean",
      "default": false
    },
    "margin_mm": {
      "type": "object",
      "additionalProperties": false,
      "description": "Page margins in millimetres.",
      "properties": {
        "top": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "right": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "bottom": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "left": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        }
      }
    },
    "font": {
      "type": "string",
      "pattern": "^[A-Za-z0-9 \\-]{1,40}$",
      "default": "Calibri",
      "description": "Body font when no template is given."
    },
    "font_size_pt": {
      "type": "number",
      "minimum": 8,
      "maximum": 16,
      "default": 11
    },
    "header_text": {
      "type": "string",
      "maxLength": 200
    },
    "footer_text": {
      "type": "string",
      "maxLength": 200,
      "description": "Footer with {page}/{pages}; empty string for none. Default \"Page {page} of {pages}\"."
    }
  }
}

Open original schema

Published input example

{
  "markdown": "# Quarterly report\n\nRevenue grew **12 %**.\n\n- Sensors\n- Services\n\n| Region | Revenue |\n|---|--:|\n| North | 120 |",
  "title": "Q3"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’