Docz.me just launched — 14 days free on any paid plan. See pricing

MDX to HTML

MDX rendered to a single self-contained HTML file. Components render statically — no React runtime, no surprises.

Docz Team · EngineeringPublished
255 / 512,000 bytes

MDX → HTML

How to convert

Three steps. No signup, no email, no cloud locker.

  1. 1

    Paste or upload

    Drop your Markdown or MDX file into the editor, paste source directly, or click Upload to load a file from disk.

  2. 2

    Choose format and theme

    Pick PDF, DOCX (Word), or HTML as the output format. Optionally switch to Academic for a cover page or README/Blog for GitHub-style typography.

  3. 3

    Convert and download

    Click Convert & Download. The file streams back as a real binary — no signup, no email, no cloud locker. Your source is never stored.

Why this converter

Built for the docz.me invoicing app — released as a free standalone because the underlying pipeline turned out to be useful on its own.

  • Server-side rendering, real binaries

    Output is a real PDF, real DOCX, or self-contained HTML — not a screenshot or rebadged HTML. Selectable text, embedded fonts, proper page breaks.

  • GFM and MDX in the same pipeline

    Tables, task lists, footnotes, autolinks parse like GitHub. Switch to MDX input for Callout / CodeBlock / Tabs / Steps components — all rendered statically.

  • Three themes, one source

    Default for clean modern docs, Academic with cover page and numbered headings, README/Blog for GitHub typography. Switch and re-render — keep your source.

  • Privacy first

    Stateless serverless function. Source text is never logged or persisted. 500 KB cap enforced before parse so the worst case is a friendly error.

  • MDX without the JS-execution risk

    Parse-only path. JSX expressions, ESM imports, and unknown components are rejected by design. No code from your source ever runs server-side.

  • No signup, no email gate

    Free, anonymous, ungated. Built by docz.me — the invoicing app for freelancers — but the converter stands alone with no account requirement.

MDX's strength is letting authors compose semantic blocks (Callout, CodeBlock, Tabs) without dropping into raw HTML. Most MDX-to-HTML tools assume your output runs inside a React app and bundle a runtime. This one outputs static HTML — components render to plain `<blockquote>`, `<table>`, and `<section>` markup with theme-driven inline styles. The result opens in any browser, prints cleanly, and ships as a single file with no JavaScript dependency.

Allowlisted components map to idiomatic HTML. Callout / Note / Warning become `.callout` blockquotes with severity-specific accent colors. CodeBlock collapses to a fenced `<pre><code>` with the language attribute preserved. Tabs flatten to sequential `<h4>` + content sections. Steps become an ordered list. Image components render as paragraph-wrapped `<img>` tags. Anything outside the allowlist downgrades to a labeled fallback block — your reader sees the gap rather than missing content.

Security and scope match the PDF and DOCX routes: parse-only path means no JS evaluation ever happens server-side; SSRF guard protects every image fetch; expressions and ESM imports are rejected at parse. Output is `text/html` returned as a download (not rendered in the marketing origin), so nothing user-supplied gets a chance to escape into our same-origin context.

Frequently asked

Does the HTML need a JavaScript runtime?

No. The output is pure HTML + inline CSS. Components are pre-rendered to semantic tags; no React, no MDX runtime, no bundler. Open the file offline and it works.

How do MDX components render?

Callouts become styled blockquotes; CodeBlock becomes `<pre><code>`; Tabs flatten to sequential headings + sections; Steps become an ordered list; Image becomes an `<img>` inside a paragraph. Unknown components show as labeled fallback blocks.

Will the HTML be valid?

Yes. The output passes W3C HTML5 validation with a proper doctype, charset, viewport meta, and a single `<style>` block in the head. Body markup is semantic.

What if I need a React-rendered version?

This route is intentionally static. If you need a React MDX runtime, use the source MDX directly with `@mdx-js/react` in your own app. The HTML output here targets the print-and-share use case.

How are images handled?

Image src URLs flow through the same SSRF guard as the PDF/DOCX routes (scheme allowlist, IP block, redirect rejection). The `<img>` tag in the output references the original URL, so the reader's browser fetches it on view.

More converters

DoczJS was archived in 2020. See what we recommend instead →