Skip to content

Markdown to Something

Convert your Markdown documents to DOCX or styled HTML
With support for Mermaid diagrams and LaTeX equations

Paste your Markdown below and choose an export option.

Advanced Features

  • Mermaid Diagrams - Create flowcharts, sequence diagrams, and more using ```mermaid code blocks
  • LaTeX Equations - Render mathematical expressions using $...$ for inline and $$...$$ for display equations
  • Syntax Highlighting - Code blocks are automatically highlighted
Mermaid Documentation LaTeX Math Guide

When checked, your HTML will be uploaded to haste.nixc.us for sharing

Feature Options

Choose one feature set (Mermaid and MathJax are mutually exclusive)

Note: Mermaid and MathJax cannot be enabled simultaneously. Choose one or disable both.

Export Options

Document Format

Regular Templates

Presentation Templates

API Usage

You can also use our API to convert markdown programmatically. Here are some examples using cURL:

Convert to DOCX

curl -X POST -H "Content-Type: application/json" \
     -d '{"markdown": "# Hello World"}' \
     https://md.colinknapp.com/api/convert

Convert to HTML (Professional Template)

curl -X POST -H "Content-Type: application/json" \
     -d '{"markdown": "# Hello World", "format": "html", "template": "professional", 
     "title": "Document Title", "subtitle": "Document Subtitle", 
     "contact": "Contact Information", "footer": "Footer Text"}' \
     https://md.colinknapp.com/api/convert

Convert to HTML and Send to Haste

curl -X POST -H "Content-Type: application/json" \
     -d '{"markdown": "# Hello World", "format": "html", "template": "professional", 
     "send_to_haste": true, "feature_set": "mermaid"}' \
     https://md.colinknapp.com/api/convert

When using send_to_haste: true, the response will include haste_key, haste_url, and preview_url fields.

Feature Options

Control Mermaid and MathJax support:

  • enable_mermaid (boolean, optional): Enable/disable Mermaid diagram support. Defaults to template's default setting.
  • enable_mathjax (boolean, optional): Enable/disable MathJax/LaTeX support. Defaults to template's default setting.

Note: Some templates have default restrictions (e.g., monospace disables MathJax by default). Setting these flags overrides the template defaults.

Feature Flags & Template Configuration

Each template can have different default settings for Mermaid and MathJax support. You can override these defaults using the feature flags in the web UI or API.

WCAG-Compliant Templates

All WCAG-compliant templates support both Mermaid and MathJax by default:

  • professional, classic, modern, creative
  • academic, blog, corporate, newspaper
  • minimalist-light, playful, modern-photo, compact

Template Defaults

Some templates have restrictions by default:

  • monospace: Mermaid enabled, MathJax disabled (conflicts with monospace styling)
  • hacker: Mermaid enabled, MathJax disabled (conflicts with terminal styling)
  • glitch: Both disabled (conflicts with glitch effects)
  • slides-monospace: Mermaid enabled, MathJax disabled

How Feature Flags Work

  1. Mutual Exclusivity: Mermaid and MathJax cannot be enabled simultaneously
  2. Web UI: Radio buttons allow choosing one feature set or disabling both
  3. API: Use feature_set parameter with value "mermaid", "mathjax", or "none"
  4. Default: If not specified, defaults to "mermaid"

Example API Usage

// Enable Mermaid (default)
{"markdown": "# Test", "template": "playful", "feature_set": "mermaid"}

// Enable MathJax instead
{"markdown": "# Test", "template": "playful", "feature_set": "mathjax"}

// Disable both
{"markdown": "# Test", "template": "playful", "feature_set": "none"}

// Legacy format (still supported, but mutually exclusive)
{"markdown": "# Test", "template": "playful", 
 "enable_mermaid": true, "enable_mathjax": false}

Testing & Consistency

All WCAG-compliant templates are tested to ensure consistent behavior:

  • ✅ Feature flags work identically across all WCAG templates
  • ✅ Script injection respects flag settings
  • ✅ Template defaults are properly configured
  • ✅ Overrides work as expected

For more details, see FEATURE_FLAGS_CONSISTENCY_PLAN.md in the repository.

Advanced Features

Using Mermaid Diagrams

Include Mermaid diagrams in your markdown using code blocks with the mermaid language identifier:

```mermaid
graph TD
    A[Start] --> B{Is it raining?}
    B -->|Yes| C[Take umbrella]
    B -->|No| D[Enjoy the weather]
```

Using LaTeX Equations

Include mathematical expressions using LaTeX syntax:

  • Inline equations: Use single dollar signs $E = mc^2$
  • Display equations: Use double dollar signs
    $$
    \frac{d}{dx}[x^n] = nx^{n-1}
    $$

Note: For currency symbols in text, escape the dollar sign with a backslash: \$5.99

Template Feature Configuration

This application uses a feature flag system to control Mermaid and MathJax support per template. This ensures consistency across WCAG-compliant templates while allowing flexibility for templates with special requirements.

Quick Reference

Template Category Mermaid MathJax
WCAG Templates (12) ✅ Enabled ✅ Enabled
monospace, hacker ✅ Enabled ❌ Disabled
glitch ❌ Disabled ❌ Disabled
Most Slide Templates ✅ Enabled ✅ Enabled

Testing & Verification

All templates are tested to ensure feature flags work correctly:

  • ✅ Template defaults are respected when flags not provided
  • ✅ Feature flags override template defaults
  • ✅ Script injection matches flag settings
  • ✅ WCAG templates behave consistently

For Developers: See FEATURE_FLAGS_CONSISTENCY_PLAN.md for the complete testing and implementation plan.

Haste Integration

This application integrates with haste.nixc.us to allow sharing HTML output without requiring server-side storage:

  • HTML Sharing: Convert markdown to HTML and share via a unique URL
  • Preview Endpoint: View shared HTML documents through the application's preview endpoint

To use this feature, check the "Send HTML to haste.nixc.us" option before converting.

The preview URL format is: https://md.colinknapp.com/haste/{haste_key}

Template Feature Configuration

This application uses a feature flag system to control Mermaid and MathJax support per template. This ensures consistency across WCAG-compliant templates while allowing flexibility for templates with special requirements.

Quick Reference

Template Category Mermaid MathJax
WCAG Templates (12) ✅ Enabled ✅ Enabled
monospace, hacker ✅ Enabled ❌ Disabled
glitch ❌ Disabled ❌ Disabled
Most Slide Templates ✅ Enabled ✅ Enabled

Testing & Verification

All templates are tested to ensure feature flags work correctly:

  • ✅ Template defaults are respected when flags not provided
  • ✅ Feature flags override template defaults
  • ✅ Script injection matches flag settings
  • ✅ WCAG templates behave consistently

For Developers: See FEATURE_FLAGS_CONSISTENCY_PLAN.md for the complete testing and implementation plan.