Why convert Markdown to JSON?
A JSON tree of a Markdown document is structured data — searchable, transformable, and easy to feed into a static-site generator, a CMS importer, or an AI prompt. Converting README files, blog posts, and documentation to JSON unlocks the data inside without losing the source format.
What is the JSON structure produced?
The root is an array of nodes. Each heading becomes { type: "heading", level, text, children: [...] } and the children array contains everything between this heading and the next same-or-higher level heading. Lists become { type: "list", ordered, items }. Tables become { type: "table", columns, rows } where rows is an array of objects keyed by column header. Code blocks become { type: "code", lang, text }. Paragraphs and blockquotes use their respective shapes.
Are nested headings reflected as nested children?
Yes. An H2 inside an H1 becomes a child of the H1 node. An H3 inside that H2 becomes a child of the H2. The tree mirrors the heading hierarchy you would see in a table of contents — making it easy to render docs as a sidebar or to slice a document by section.
How are GitHub tables handled?
GFM tables are detected by the |---| separator row. The header row supplies column names, and each subsequent row becomes an object with those names as keys. This makes Markdown tables directly usable as data — paste a release notes table and you have a list of records ready for any pipeline.
What about inline formatting in headings or paragraphs?
Inline formatting (**bold**, *italic*, `code`, links) is preserved verbatim in the text fields — the converter does not strip Markdown syntax inside text nodes. If your downstream consumer wants plain text, post-process the output to remove inline markers; if it wants Markdown, the source survives the round-trip.
Can I round-trip Markdown to JSON and back?
For the supported subset (headings, paragraphs, lists, tables, code blocks, blockquotes, horizontal rules) the round-trip is structurally lossless. Inline formatting survives because text is preserved verbatim. Edge cases like footnotes, definition lists, and raw HTML are not modeled, so they survive only as paragraph text.
Why is the output an array, not an object?
A Markdown document is an ordered sequence of blocks — order matters. JSON arrays preserve order; JSON objects do not. The top-level array reflects the document order, and each heading node carries its own children array. If you need an object keyed by heading text, post-process by reducing the array.
Is my Markdown sent to a server?
No. Parsing happens in your browser via JavaScript. Internal docs, drafts, and proprietary content never leave the device. Verify in your browser DevTools Network tab — no requests fire when you paste or load the sample.