Skip to content

Markdown

The Markdown node converts content between Markdown and HTML in both directions. It is useful for turning text written in Markdown (for example from a form or an AI response) into HTML ready for an email or a page, or the other way around, to clean HTML and get readable Markdown.

It is equivalent to n8n’s Markdown node.

In the Markdown → HTML direction it supports headings, ordered and unordered lists, bold, italic, links, images, inline code, code blocks, blockquotes, and horizontal rules. In the HTML → Markdown direction it walks the HTML and reconstructs those same elements as Markdown.

ParameterTypeRequiredDescription
actionselectYesDirection: markdownToHtml (default) or htmlToMarkdown
valuetextareaYesMarkdown or HTML to convert. Supports dynamic variables
outputKeytextNoOutput field name. Empty = html or markdown depending on the direction

The node adds the result to data in the field named by outputKey. If left empty, the field is html (for markdownToHtml) or markdown (for htmlToMarkdown):

{
"title": "Welcome",
"html": "<h1>Hello</h1>\n<p>Text in <strong>bold</strong></p>"
}
{
"label": "To HTML",
"action": "markdownToHtml",
"value": "{{data.markdown_body}}",
"outputKey": "html_body"
}

The html_body field is ready to use in an email-sending node.

{
"label": "To Markdown",
"action": "htmlToMarkdown",
"value": "{{data.html_content}}",
"outputKey": "md_content"
}
{
"label": "Render",
"action": "markdownToHtml",
"value": "{{data.text}}"
}

Without outputKey, the result is stored in the html field.

  • The Markdown → HTML conversion covers the most common syntax; it is not a full CommonMark parser
  • If the input data is an object, the result is added without losing existing fields; if not, it is wrapped in { value, [outputKey] }
  • The value field supports dynamic and cross-node variables: {{data.field}}, {{@NodeName.field}}
  • Does not require credentials