Free tool
Markdown to JSON converter
Paste Markdown or drop a .md file and get a structured JSON document back: every heading, paragraph, list, table, code block and quote becomes an object with a type, so the structure the file already has is available to a script, an API or a CMS. The conversion runs in this tab — nothing is uploaded.
or drop a .md file onto this box
Block types reference
{
"type": "document",
"blocks": [
{
"type": "heading",
"depth": 1,
"text": "Release 2.0 notes"
},
{
"type": "paragraph",
"text": "The **converter** turns each block into an object with a type."
},
{
"type": "heading",
"depth": 2,
"text": "Highlights"
},
{
"type": "list",
"ordered": false,
"start": 1,
"items": [
{
"text": "Faster preview"
},
{
"text": "Tables keep their alignment",
"checked": true
},
{
"text": "Nested details:",
"list": {
"ordered": true,
"start": 1,
"items": [
{
"text": "one"
},
{
"text": "two"
}
]
}
}
]
},
{
"type": "blockquote",
"blocks": [
{
"type": "paragraph",
"text": "Documents never leave the browser."
}
]
},
{
"type": "table",
"align": [
"left",
"right"
],
"head": [
"Area",
"Status"
],
"rows": [
[
"Parser",
"ready"
]
]
},
{
"type": "code",
"lang": "js",
"text": "const blocks = parse(markdown);"
}
]
}Runs entirely in your browser — your file is never uploaded.
How to convert Markdown to JSON
- Paste Markdown into the box above, drop a
.mdfile on it, or press Load sample to see the shape of the output. The JSON is rebuilt as you type. - The document is parsed into blocks. Headings get
depth, lists getordered,startanditems, tables gethead,rowsandalign, and code getslang. Inline syntax such as**bold**or a link stays as written inside each block’stext. - Copy the JSON or download it as a
.jsonfile. The JSON to Markdown converter reads the same schema back into Markdown whenever you need it.
What the JSON looks like
- The output is one object:
{"type": "document", "blocks": [...]}. It is notmarked’s internal token stream, which carries rendering detail and changes between releases: it is a small schema you can rely on. textholds inline Markdown exactly as it was written, so bold, escapes and reference-style links survive. That is also why the document converts back without loss.- Raw HTML, link reference definitions and YAML front matter keep blocks of their own (
html,def,frontmatter) instead of being dropped, so nothing in the file disappears silently.
Frequently asked questions
What JSON structure does this produce?
A block tree: {"type":"document","blocks":[{"type":"heading","depth":1,"text":"Title"}]}. The Block types reference under the tool lists the fields every block carries.
Does it keep bold, links and other inline formatting?
Yes, inside text, in Markdown form. Tick Plain text if you need the words without the syntax: bold markers disappear and a link keeps its label without the URL.
Is my Markdown uploaded or stored?
No. The parser is bundled into this page and the conversion happens in the browser tab; the file never leaves your device. There is no account, no queue and no server-side job.
Can I turn the JSON back into Markdown?
Yes — that is what the JSON to Markdown converter does. Both pages share one schema, so a round trip returns the document you started with and editing the JSON by hand is safe.
Want to read the Markdown instead?
Open the editor to render the same document with live preview, math, diagrams and export to PDF, HTML or DOCX. The JSON tools stay one click away in the Tools menu.
Open the Markdown Viewer