MDX Validator
Check MDX for syntax errors
New to MDX? Read MDX vs Markdown or browse the MDX cheatsheet.
How to Validate MDX
Paste MDX into the editor and validation runs on its own, about a third of a second after you stop typing. Unclosed JSX tags, mismatched components, unbalanced curly braces, and import statements that won't parse all surface inline with a line number, a column, and a message describing what broke. The parser is remark-mdx, the same one your build uses, so a file that comes back clean here compiles in your project.
How validation works
Your content goes through remark-mdx, the parser behind Next.js, Docusaurus, and Astro. It runs a full parse pass and collects every message the unified pipeline produces, each tagged with a line, a column, and a severity. Validation re-runs 300ms after your last keystroke, which keeps the editor responsive while you type into a large file.
Common errors the validator catches
The usual culprit is a JSX tag nobody closed: a <Callout> with no </Callout>, or a </Note> closing something that was never opened. After that come unbalanced curly braces in expressions, and import statements that fail with an acorn parse error. Strict mode filters the list down to errors only and hides warnings.
What it doesn't check
Frontmatter is treated as an opaque block. remark-mdx marks where it starts and ends but never parses the YAML inside it, so a duplicate key or a tab used for indentation in your frontmatter passes here and still causes trouble at build time. Paste that block into the YAML Validator instead. Imports aren't resolved either, so <Callout> validates whether or not anything named Callout exists in your project.
Checking a whole project
This page handles one file at a time. For a repository, add remark-mdx to CI and fail the build on parse errors. It's the same parser running here, so the results match.
Frequently Asked Questions
Is the MDX Validator free and open source?
What errors does the validator catch?
Does the validator check my frontmatter?
Does validation run automatically?
Is this the same as my build-time validator?
Can I validate multiple files at once?
About this tool
The MDX Validator is free and open source. It runs entirely in your browser. Your input is never uploaded, stored, or logged. Open the network tab in your developer tools while the tool runs and you can confirm that for yourself. The full source code is on GitHub under the Apache 2.0 license, so you can read the code, file issues, or fork the project. There are no ads, no accounts, and no usage limits. Built and maintained by Jamdesk.
Maintained by Jamdesk · Last reviewed
Validate MDX on every deploy
Jamdesk validates your MDX automatically, so broken docs never ship. Start for Free