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

Conversion options
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

  1. Paste LaTeX into the box above, drop a .tex file on it, or press Load sample to start from a working paper. The JSON is rebuilt as you type.
  2. The source is parsed into blocks, and the preamble is read for title, author and date. \section and its siblings become heading blocks with a depth, lists keep their nesting, tabular becomes a table with its column alignment, and maths becomes a math block holding the LaTeX as written.
  3. Copy the JSON or download it as a .json file. 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

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