microsoft / microsoft/markitdown

Feature Request: Add JSON Output Option

Open
#2,029 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

Summary

Currently, MarkItDown converts supported documents into Markdown format only. It would be useful to provide an optional JSON output format that preserves document structure, such as headings, paragraphs, tables, images, and metadata.

Motivation

Many developers use MarkItDown as part of automated processing pipelines and LLM workflows. Structured JSON output would allow easier integration with downstream applications without requiring additional parsing of Markdown.

Proposed Solution

Add a command-line option such as:

markitdown document.pdf --output-format json

Example output:

{
"title": "Sample Document",
"sections": [
{
"heading": "Introduction",
"content": "..."
}
]
}
Benefits
Easier integration with AI pipelines
Structured document representation
Better support for data extraction workflows
Reduced need for custom Markdown parsing

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. First identify the existing command-line output handling and document the proposed JSON schema and its expected coverage for headings, paragraphs, tables, images, and metadata; done requires a defined option and behavior that can be validated across supported document types.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.