Free tool
LaTeX to JSON converter
Paste LaTeX or drop a .tex file and get a structured JSON document back: every section, paragraph, list, table, equation and code block becomes an object with a type, so the structure of the paper is available to a script, an API or a CMS. The conversion runs in this tab — nothing is uploaded.
or drop a .tex file onto this box
Sample output: the JSON this page produces
{
"type": "document",
"title": "Release 2.0 notes",
"author": "Docs team",
"date": "October 2026",
"blocks": [
{
"type": "heading",
"depth": 1,
"text": "Highlights"
},
{
"type": "paragraph",
"text": "Preview is faster, and **tables** keep their alignment. Inline maths like $E = mc^2$ survives the conversion."
},
{
"type": "list",
"ordered": false,
"start": 1,
"items": [
{
"text": "Live preview while you type"
},
{
"text": "Tables, lists and *math*"
}
]
},
{
"type": "heading",
"depth": 2,
"text": "Pipeline"
},
{
"type": "list",
"ordered": true,
"start": 1,
"items": [
{
"text": "Parse the source"
},
{
"text": "Render each block"
}
]
},
{
"type": "table",
"align": [
"left",
"right"
],
"head": [
"Area",
"Status"
],
"rows": [
[
"Parser",
"ready"
],
[
"Preview",
"ready"
]
]
},
{
"type": "math",
"text": "E = mc^2"
}
]
}Runs entirely in your browser — your file is never uploaded.
How to convert LaTeX to JSON
- Paste LaTeX into the box above, drop a
.texfile on it, or press Load sample to start from a working paper. The JSON is rebuilt as you type. - The source is parsed into blocks, and the preamble is read for
title,authoranddate.\sectionand its siblings becomeheadingblocks with adepth, lists keep their nesting,tabularbecomes atablewith its column alignment, and maths becomes amathblock holding the LaTeX as written. - Copy the JSON or download it as a
.jsonfile. It is the block schema the Markdown to JSON tool writes, so JSON to Markdown reads it back as Markdown.
What the JSON looks like
- The output is one object —
{"type": "document", "title": "…", "blocks": [...]}— where each section, list and table is an object with atype. Nothing is nested deeper than the document itself. - Inline LaTeX becomes inline Markdown inside each block’s
text:\textbf{}turns into**…**and an accent turns into the letter it stands for, which is why the JSON renders as Markdown without a second conversion. - Anything with no Markdown counterpart is kept verbatim rather than dropped: an unknown environment stays a
rawblock, and\cite,\refand\labelarguments survive inside the text, so a citation is never silently lost.
Frequently asked questions
Which LaTeX constructs are understood?
Sections down to \subparagraph, both list kinds plus description, tabular, tabularx and longtable, display and inline maths, verbatim, lstlisting and minted, figures with \includegraphics and captions, quotes, the bibliography, and the common inline commands and accents. A construct outside that list is kept as written rather than approximated.
Does it need a LaTeX installation?
No. There is no TeX engine involved: the converter reads the source and maps it to blocks inside this browser tab. Nothing is compiled, uploaded or sent to a server.
Why is the preamble missing from the blocks?
Commands such as \documentclass and \usepackage describe how to typeset, not what the document says. Only \title, \author and \date are taken from it, into the document object’s own fields.
Can I turn the JSON back into Markdown?
Yes — the JSON to Markdown converter reads the same schema, math blocks included. The LaTeX to Markdown tool does both steps at once.
Need Markdown rather than JSON?
The LaTeX to Markdown converter writes the same parse straight to Markdown, and the editor previews it live before you export to PDF, HTML or DOCX.
Open the Markdown Viewer