Markdown AST Sanity Checker
Broken Markdown silently breaks docs sites and RAG ingestion. This tool parses your Markdown into a block-level AST, flags structural problems with line numbers, and offers an auto-fixed version — all in your browser.
Tool interface
Results
Issues
AST tree
Introduction
A single unclosed code fence can swallow the rest of your document, and heading jumps break navigation and outline generation. This tool catches those problems before publishing or indexing.
How it works
- Splits source into lines and classifies blocks (heading, code, list, table, quote, paragraph).
- Builds a block-level AST tree for inspection.
- Runs structural validation rules with line numbers.
- Produces a conservatively auto-fixed version.
Privacy
All parsing is local. No upload, no account, no API key.
Limitations
- Block-level parser; does not implement the full CommonMark spec.
- Auto-fix only addresses balance/fence issues, not semantics.
FAQ
Why does my code block swallow the rest of the doc?
An unclosed fence makes everything after it part of the code block. The checker flags the opening line and the auto-fix appends a closing fence.
Is my Markdown uploaded?
No. Everything runs in your browser.