Markdown to XML
Convert Markdown documents to structured XML with multiple output profiles (OpenDocument, JATS Archiving / Authoring / Publishing). Instant client-side conversion ideal for publishing workflows.
Transform your Markdown documents into structured JSON format. Extract headers, content, metadata, and organize everything into a clean, machine-readable JSON structure.
Instant JSON output with live preview
Organized headings, content, and metadata
Clean JSON ready for APIs and databases
Enter Markdown text on the left, and the structured JSON will be generated in real-time on the right
{}
Get started quickly with our curated collection of Markdown templates. Click any template to load it into the converter and see the JSON structure instantly.
REST API documentation with endpoints and examples
Structured blog post with metadata and content sections
Technical product specification with features and requirements
Structured meeting notes with action items and decisions
Step-by-step tutorial with code examples and explanations
Learn how to use the live converter below to turn any Markdown document into a fully-fledged JSON Abstract Syntax Tree (AST). The tool supports three popular parsing engines – Pandoc
, Remark
and markdown-it
– and lets you copy or download the result with a single click.
Converting Markdown directly to HTML is great for rendering, but converting it to a JSON AST unlocks much more: you can analyse, transform, store, or re-render the content later in any format you need. Each element (headers, paragraphs, links, images, code blocks, …) is preserved as a node so your application can work with structured data instead of raw strings.
💡 Tip
Choose Pandoc
when you need the richest AST, Remark
when you are in the React / unified ecosystem, or markdown-it
when you just need fast tokenisation.
Switch between "Text Input" and "File Upload". You can paste Markdown directly or drag-and-drop a .md
file.
Open the settings dropdown (⚙︎) and choose Pandoc
, Remark
or markdown-it
. You can also toggle pretty-printed JSON.
The JSON AST refreshes automatically as you type or replace the file – no extra clicks required.
Use the "Copy" button to put the JSON on your clipboard or "Download" to save a .json
file locally.
The exact top-level keys depend on the engine you choose:
blocks
– All block-level nodesmeta
– Document metadatapandoc-api-version
– Removed automatically when pretty-print is enabledtype
– Always "root"
children
– Array of mdast nodes[]
– Flat array of tokens, each holding type
, tag
, nesting
and more# Hello World This is **Markdown**.
{ "blocks": [ { "t": "Header", "c": [ 1, ["hello-world", [], []], [{"t": "Str", "c": "Hello"}, {"t": "Space"}, {"t": "Str", "c": "World"}] ] }, { "t": "Para", "c": [ {"t": "Str", "c": "This"}, {"t": "Space"}, {"t": "Strong", "c": [{"t": "Str", "c": "Markdown"}]}, {"t": "Str", "c": "."} ] } ], "meta": {} }
A logical heading structure (H1 → H2 → H3 …) makes the AST easier to analyse and transform later.
In the settings dropdown you can toggle pretty-printed JSON. This removes the Pandoc API version and indents the output for easier reading.
Specifying the language (e.g. ```js
) lets parsers include the information in the AST which later helps with syntax highlighting or executability.
Get answers to common questions about converting Markdown to JSON, understanding the output structure, and integrating with your applications.
Discover our comprehensive collection of Markdown conversion tools. Transform your content into various formats with professional results.
Convert Markdown documents to structured XML with multiple output profiles (OpenDocument, JATS Archiving / Authoring / Publishing). Instant client-side conversion ideal for publishing workflows.
Transform Markdown documents into powerful AsciiDoc format for professional technical documentation, books, and publishing workflows with advanced formatting capabilities.
Transform Markdown documents into reStructuredText format. Convert headers, lists, code blocks, and text formatting to RST markup for Sphinx documentation and Python projects.
Convert Markdown documents to Slack-formatted text with proper formatting for channels and messages. Perfect for team communication.
Convert Markdown documents to Confluence Wiki format with proper syntax and formatting. Perfect for team documentation and knowledge sharing.
Transform Markdown documents into clean, readable plain text. Remove formatting syntax while preserving content.
Convert images to markdown syntax, generate ASCII art, and analyze images with AI. Perfect for documentation and technical blogs.
Convert Markdown documents to ConTeXt format for professional typography and advanced document design. Perfect for academic papers, books, and high-quality publishing with superior layout control.