MDX Converter Online

Render MDX, convert HTML to MDX, and escape text to literal MDX in your browser. Your content stays local.

Your MDX, HTML, and text are processed locally in your browser and nothing is uploaded to a server.

Built and maintained by Udit Agarwal

Need plain Markdown instead? Try the Markdown tool.

About MDX Converter

This MDX converter helps you work with MDX content three ways: render MDX as formatted, readable text, convert HTML into clean GitHub-flavoured Markdown/MDX, and escape plain text into literal, valid MDX. It is built for developers, technical writers, and documentation teams who move content between HTML, Markdown, and MDX. Use the HTML to MDX mode to turn pasted markup into tidy Markdown with headings, tables, code blocks, and lists, or the render mode to preview MDX without spinning up a build. JSX components are never executed: components are stripped while their inner text is kept, and expressions are removed. Everything runs locally in your browser, so your drafts, docs, and snippets stay on your machine while you convert and preview.

Features

  • Render MDX as formatted text with a live preview pane
  • Convert HTML into clean GitHub-flavoured Markdown/MDX
  • Escape plain text into literal, valid MDX (handles < { } characters)
  • Preserves headings, tables, code blocks, lists, and blockquotes when converting HTML
  • Strips JSX components and expressions safely without executing any code
  • Copy rendered text, HTML, or MDX output with one click
  • Download results as an .html or .mdx file

How to use the MDX Converter

  1. Pick a mode at the top: MDX → Preview, HTML → MDX, or Text → MDX.
  2. Paste your MDX, HTML, or plain text into the input box (or load a sample).
  3. Review the rendered preview or converted output on the right.
  4. Use Copy to grab the text, HTML, or MDX, or Download to save it as a file.

Example

Input

<h2>Features</h2>
<ul><li>Fast</li><li>Local</li></ul>

Output

## Features

- Fast
- Local

HTML to MDX mode converts markup into clean Markdown.

Common errors & troubleshooting

  • JSX components disappear from the output. — This is expected. Components are removed and their inner text is kept; nothing is executed. Inline the content as Markdown if you need it preserved.
  • Curly-brace expressions like {version} vanish in preview mode. — MDX expressions are stripped because no JavaScript runs. Replace them with literal text before rendering.
  • Pasted text breaks MDX because of stray < or { characters. — Use Text to MDX mode to escape <, {, and } so the content becomes valid, literal MDX.
  • HTML converts but a tag is ignored. — Conversion targets common structural tags (headings, tables, code, lists, links, blockquotes). Simplify uncommon or malformed markup and convert again.

Frequently asked questions

What is the MDX Converter?
The MDX Converter renders MDX as formatted text, converts HTML into clean Markdown/MDX, and escapes plain text into literal MDX. You switch between the three modes with one click.
Does the MDX Converter run or execute JSX components?
No. Components are removed (their inner text is kept) and expressions are stripped, so nothing is ever executed.
What does HTML to MDX produce?
It outputs GitHub-flavoured Markdown, including headings, tables, code blocks, lists, links, and blockquotes.
How do I make plain text valid MDX?
Use the Text → MDX mode, which escapes characters like <, {, and } so the text becomes literal, valid MDX.
Can I convert MDX to Markdown with this tool?
Yes. The HTML to MDX mode produces GitHub-flavoured Markdown, and the preview mode renders MDX to readable text you can copy out as Markdown-friendly content.
Is my content uploaded anywhere when I use the MDX Converter?
No. The MDX Converter runs entirely in your browser, so your MDX, HTML, and text never leave your device.

Related tools

  • Markdown Preview — Render Markdown to HTML with a live preview.
  • HTML Formatter — Beautify or minify HTML, format inline CSS/JS, and preview the result.
  • XML Formatter — Beautify, minify and validate XML, and convert XML ↔ JSON.
  • HTML Escape / Unescape — Escape and unescape HTML special characters and entities.
  • JSON to Code — Generate Go, Rust, Python, Java, Kotlin, C# and TypeScript types from JSON.
  • Mermaid Diagram Renderer — Render Mermaid diagrams (flowcharts, sequence, gantt) to SVG in your browser.
  • Case Converter — Convert text between camelCase, snake_case, kebab-case, PascalCase and more.
  • Text Diff — Compare two texts line-by-line and see additions and removals.

Guides

More Code Formatters tools

  • CSS / SCSS Formatter — Beautify or minify CSS/SCSS/LESS, sort properties and remove duplicates.
  • JS / TS Formatter — Beautify JavaScript, TypeScript and JSX/TSX with Prettier options, or minify plain JavaScript.
  • HTML Formatter — Beautify or minify HTML, format inline CSS/JS, and preview the result.
  • XML Formatter — Beautify, minify and validate XML, and convert XML ↔ JSON.
  • SQL Formatter — Format SQL for MySQL, PostgreSQL, SQL Server, SQLite, BigQuery and Oracle.
  • GraphQL Formatter — Format or minify GraphQL queries and schemas, validate syntax and extract operations.
  • Dockerfile Formatter — Format a Dockerfile and get best-practice / lint suggestions.
  • MongoDB Query Formatter — Format MongoDB shell queries and aggregation pipelines.
  • Contrast Checker — Check WCAG colour contrast ratio and AA/AAA pass for any two colours.
  • Mermaid Diagram Renderer — Render Mermaid diagrams (flowcharts, sequence, gantt) to SVG in your browser.
  • SVG Optimizer — Minify SVG — strip comments, metadata and editor cruft, and collapse whitespace.
  • MongoDB Query Beautifier — Beautify and indent MongoDB queries and find() statements in your browser.

See all Code Formatters tools (32) · All tools