npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-md2docx

v1.0.2

Published

n8n community node to convert Markdown to DOCX using @mohtasham/md-to-docx

Readme

n8n Community Node: Markdown → DOCX

Convert Markdown text into a DOCX file inside your n8n workflows. This node uses @mohtasham/md-to-docx to generate a .docx and outputs it as binary data. No Pandoc or custom builds required.

  • Purpose: Turn Markdown content from incoming items into a Word document with customizable formatting
  • Input sources: JSON field (string) or Binary text file
  • Output: Binary .docx on a configurable property
  • Document types: Standard documents or report-style formatting
  • Advanced formatting: Font sizes, alignment, spacing, and RTL text support

Powered by @mohtasham/md-to-docx (repo).

Installation

Follow n8n’s Community Nodes installation guide:

  • In n8n: Settings → Community Nodes → Install
  • Search for this package (or install from your local build while developing)
  • Docs: https://docs.n8n.io/integrations/community-nodes/installation/

If developing locally, run:

npm install
n8n-node build
n8n-node dev

This will launch an instance of N8N, where you can test out the node locally.

Node: Markdown to DOCX

  • Display name: Markdown to DOCX
  • Name: mdToDocx
  • Group: transform
  • Version: 1.0.2

Parameters

  • Markdown Source (options)
    • From Field: read Markdown from a JSON field
    • From Binary (Text File): read Markdown from an incoming binary property
  • Markdown Field (string, required when source = From Field)
    • Name of the JSON field containing the Markdown string (default: markdown)
  • Binary Property (string, required when source = From Binary)
    • Binary property name that holds a text/markdown file (default: data)
  • Filename (string, required)
    • Output filename for the generated docx (default: document.docx)
  • Output Binary Property (string, required)
    • Binary property to store the generated docx (default: data)
  • Document Type (options)
    • Document: Standard document format
    • Report: Report-style document format
  • Advanced Options (collection, optional)
    • Title Size (number): Font size for document title in half-points (default: 48 = 24pt)
    • Heading 1 Size (number): Font size for H1 headings in half-points (default: 48 = 24pt)
    • Heading 2 Size (number): Font size for H2 headings in half-points (default: 36 = 18pt)
    • Paragraph Size (number): Font size for paragraphs in half-points (default: 24 = 12pt)
    • Paragraph Alignment (options): Text alignment - Left, Right, Center, or Justified (default: Left)
    • Line Spacing (number): Line spacing multiplier (default: 1.15)
    • Heading Spacing (number): Spacing before/after headings (default: 240)
    • Paragraph Spacing (number): Spacing before/after paragraphs (default: 240)
    • Text Direction (options): Left to Right (LTR) or Right to Left (RTL) for international text support (default: LTR)

Inputs

  • Main (JSON and/or Binary)
    • Provide Markdown via the configured source

Outputs

  • Main (JSON + Binary)
    • Adds a binary property (as configured in "Output Binary Property") containing the generated DOCX
    • MIME type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

Usage Examples

Example 1: Markdown from JSON field

  1. Add a Set node that outputs a field markdown with your Markdown content, for example:
    • # Title\n\nSome paragraph with **bold**.
  2. Add the “Markdown to DOCX” node:
    • Markdown Source: From Field
    • Markdown Field: markdown
    • Filename: my-doc.docx
    • Output Binary Property: file
  3. Add a node that can handle binary output (e.g. “Write Binary File” or any downstream consumer).

Example 2: Markdown from Binary

  1. Ingest a text/markdown file as binary (e.g. via HTTP Request → Binary or Read Binary File)
  2. Add the “Markdown to DOCX” node:
    • Markdown Source: From Binary (Text File)
    • Binary Property: data (or your binary key)
    • Filename: converted.docx
    • Output Binary Property: docx

Example 3: Custom Formatting

  1. Add a Set node with Markdown content
  2. Add the "Markdown to DOCX" node:
    • Markdown Source: From Field
    • Markdown Field: markdown
    • Document Type: Report
    • Filename: styled-report.docx
    • Advanced Options:
      • Title Size: 56 (28pt)
      • Paragraph Size: 22 (11pt)
      • Paragraph Alignment: Justified
      • Line Spacing: 1.5
      • Text Direction: RTL (for Arabic/Hebrew content)

Compatibility

  • Node.js: >= 20
  • n8n Nodes API: 1

Resources

  • n8n Community Nodes docs: https://docs.n8n.io/integrations/#community-nodes
  • md-to-docx: https://github.com/MohtashamMurshid/md-to-docx

Maintainer

GitHub: @elabbarw

Disclaimer

This project is provided as-is. The maintainer does not take responsibility for supporting this node or for any outputs or consequences resulting from its use.

License

MIT