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

MDX to PDF

MDX with semantic components, rendered as a real PDF. Callouts, code blocks, tabs (linearised), all theme-aware.

Docz Team · EngineeringPublished
255 / 512,000 bytes

MDX → PDF

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.

PDFs are the long-tail life of a document — the version that survives in someone's downloads folder for a decade. MDX gives the author rich semantic affordances; this converter preserves them in the PDF render. Callouts get colored borders matched to severity (info/warning/note). CodeBlock components keep their language tag visible in the HTML output and emit monospaced runs in PDF. Tabs flatten into stacked sections with each label as a sub-heading — readable in print, no interactivity lost because there was nothing the PDF could honor anyway.

Security posture is identical to the markdown-to-PDF route: SSRF guard on every Image URL, scheme + length checks on bare markdown image syntax, no JSX expression evaluation. The trade-off versus a true MDX runtime is intentional — this route trusts no user input beyond the curated allowlist, and produces a PDF you can hand to a stakeholder without thinking twice about what code might have run during render.

Themes fully apply. Academic theme renders a centered title page with the document's first heading, then numbers h1–h3 throughout the body. README/Blog brings GitHub-style typography for technical content. Default keeps the clean baseline. Components inherit theme tokens — Callouts pick up theme accent colors, fonts match the body family, spacing aligns with the rest of the document.

Frequently asked

What MDX features render in PDF?

All allowlisted components: Callout, Note, Warning (colored info blocks), CodeBlock (mono shading), Tabs (stacked headings), Steps (numbered list), Image (SSRF-guarded). JSX expressions and unknown components downgrade to a styled fallback block.

Are syntax highlights included?

Not in v1. Code blocks render with monospaced runs and light shading. Shiki-driven token-coloring across PDF/DOCX is a phase 5 candidate; HTML highlight may ship sooner.

Will my custom MDX components work?

If they're in the v1 allowlist, yes. Custom names are rewritten to a labeled fallback so readers see what was missing rather than blank space. Adding to the allowlist is a code change.

Can I attach metadata like author or date?

The Academic theme uses the first h1 as title and renders today's date. Custom author input is on the polish list. For now, include the author name in your h1 or a leading paragraph.

Is the PDF accessible to screen readers?

Basic structure tags are emitted by `@react-pdf/renderer`. Full PDF/UA compliance (tagged PDFs, full alt-text on images) is a roadmap item once the renderer's accessibility primitives mature.

More converters

Came here looking for DoczJS? See our DoczJS alternatives page →