URL test: github.com/microsoft/markitdown
error:
[Skip to content](#start-of-content)

## Navigation Menu

Toggle navigation

[Sign in](/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmarkitdown)

Appearance settings

* Platform

  + AI CODE CREATION
    - [GitHub CopilotWrite better code with AI](https://github.com/features/copilot)
    - [GitHub SparkBuild and deploy intelligent apps](https://github.com/features/spark)
    - [GitHub ModelsManage and compare prompts](https://github.com/features/models)
    - [MCP RegistryNewIntegrate external tools](https://github.com/mcp)
  + DEVELOPER WORKFLOWS
    - [ActionsAutomate any workflow](https://github.com/features/actions)
    - [CodespacesInstant dev environments](https://github.com/features/codespaces)
    - [IssuesPlan and track work](https://github.com/features/issues)
    - [Code ReviewManage code changes](https://github.com/features/code-review)
  + APPLICATION SECURITY
    - [GitHub Advanced SecurityFind and fix vulnerabilities](https://github.com/security/advanced-security)
    - [Code securitySecure your code as you build](https://github.com/security/advanced-security/code-security)
    - [Secret protectionStop leaks before they start](https://github.com/security/advanced-security/secret-protection)
  + EXPLORE
    - [Why GitHub](https://github.com/why-github)
    - [Documentation](https://docs.github.com)
    - [Blog](https://github.blog)
    - [Changelog](https://github.blog/changelog)
    - [Marketplace](https://github.com/marketplace)

  [View all features](https://github.com/features)
* Solutions

  + BY COMPANY SIZE
    - [Enterprises](https://github.com/enterprise)
    - [Small and medium teams](https://github.com/team)
    - [Startups](https://github.com/enterprise/startups)
    - [Nonprofits](https://github.com/solutions/industry/nonprofits)
  + BY USE CASE
    - [App Modernization](https://github.com/solutions/use-case/app-modernization)
    - [DevSecOps](https://github.com/solutions/use-case/devsecops)
    - [DevOps](https://github.com/solutions/use-case/devops)
    - [CI/CD](https://github.com/solutions/use-case/ci-cd)
    - [View all use cases](https://github.com/solutions/use-case)
  + BY INDUSTRY
    - [Healthcare](https://github.com/solutions/industry/healthcare)
    - [Financial services](https://github.com/solutions/industry/financial-services)
    - [Manufacturing](https://github.com/solutions/industry/manufacturing)
    - [Government](https://github.com/solutions/industry/government)
    - [View all industries](https://github.com/solutions/industry)

  [View all solutions](https://github.com/solutions)
* Resources

  + EXPLORE BY TOPIC
    - [AI](https://github.com/resources/articles?topic=ai)
    - [Software Development](https://github.com/resources/articles?topic=software-development)
    - [DevOps](https://github.com/resources/articles?topic=devops)
    - [Security](https://github.com/resources/articles?topic=security)
    - [View all topics](https://github.com/resources/articles)
  + EXPLORE BY TYPE
    - [Customer stories](https://github.com/customer-stories)
    - [Events & webinars](https://github.com/resources/events)
    - [Ebooks & reports](https://github.com/resources/whitepapers)
    - [Business insights](https://github.com/solutions/executive-insights)
    - [GitHub Skills](https://skills.github.com)
  + SUPPORT & SERVICES
    - [Documentation](https://docs.github.com)
    - [Customer support](https://support.github.com)
    - [Community forum](https://github.com/orgs/community/discussions)
    - [Trust center](https://github.com/trust-center)
    - [Partners](https://github.com/partners)

  [View all resources](https://github.com/resources)
* Open Source

  + COMMUNITY
    - [GitHub SponsorsFund open source developers](https://github.com/sponsors)
  + PROGRAMS
    - [Security Lab](https://securitylab.github.com)
    - [Maintainer Community](https://maintainers.github.com)
    - [Accelerator](https://github.com/accelerator)
    - [GitHub Stars](https://stars.github.com)
    - [Archive Program](https://archiveprogram.github.com)
  + REPOSITORIES
    - [Topics](https://github.com/topics)
    - [Trending](https://github.com/trending)
    - [Collections](https://github.com/collections)
* Enterprise

  + ENTERPRISE SOLUTIONS
    - [Enterprise platformAI-powered developer platform](https://github.com/enterprise)
  + AVAILABLE ADD-ONS
    - [GitHub Advanced SecurityEnterprise-grade security features](https://github.com/security/advanced-security)
    - [Copilot for BusinessEnterprise-grade AI features](https://github.com/features/copilot/copilot-business)
    - [Premium SupportEnterprise-grade 24/7 support](https://github.com/premium-support)
* [Pricing](https://github.com/pricing)

Search or jump to...

# Search code, repositories, users, issues, pull requests...

Search

Clear

[Search syntax tips](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)

# Provide feedback

We read every piece of feedback, and take your input very seriously.

[ ]
Include my email address so I can be contacted

Cancel
 Submit feedback

# Saved searches

## Use saved searches to filter your results more quickly

Cancel
 Create saved search

[Sign in](/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmarkitdown)

[Sign up](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=microsoft%2Fmarkitdown)

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

[microsoft](/microsoft)
/
**[markitdown](/microsoft/markitdown)**
Public

* [Notifications](/login?return_to=%2Fmicrosoft%2Fmarkitdown) You must be signed in to change notification settings
* [Fork
  5.8k](/login?return_to=%2Fmicrosoft%2Fmarkitdown)
* [Star
   95.9k](/login?return_to=%2Fmicrosoft%2Fmarkitdown)

* [Code](/microsoft/markitdown)
* [Issues
  320](/microsoft/markitdown/issues)
* [Pull requests
  198](/microsoft/markitdown/pulls)
* [Discussions](/microsoft/markitdown/discussions)
* [Actions](/microsoft/markitdown/actions)
* [Projects](/microsoft/markitdown/projects)
* [Models](/microsoft/markitdown/models)
* [Security and quality
  0](/microsoft/markitdown/security)
* [Insights](/microsoft/markitdown/pulse)

Additional navigation options

* [Code](/microsoft/markitdown)
* [Issues](/microsoft/markitdown/issues)
* [Pull requests](/microsoft/markitdown/pulls)
* [Discussions](/microsoft/markitdown/discussions)
* [Actions](/microsoft/markitdown/actions)
* [Projects](/microsoft/markitdown/projects)
* [Models](/microsoft/markitdown/models)
* [Security and quality](/microsoft/markitdown/security)
* [Insights](/microsoft/markitdown/pulse)

# microsoft/markitdown

main

[Branches](/microsoft/markitdown/branches)[Tags](/microsoft/markitdown/tags)

Go to file

Code

Open more actions menu

## Folders and files

| Name | | Name | Last commit message | Last commit date |
| --- | --- | --- | --- | --- |
| Latest commit   History[305 Commits](/microsoft/markitdown/commits/main/)   305 Commits | | |
| [.devcontainer](/microsoft/markitdown/tree/main/.devcontainer ".devcontainer") | | [.devcontainer](/microsoft/markitdown/tree/main/.devcontainer ".devcontainer") |  |  |
| [.github](/microsoft/markitdown/tree/main/.github ".github") | | [.github](/microsoft/markitdown/tree/main/.github ".github") |  |  |
| [packages](/microsoft/markitdown/tree/main/packages "packages") | | [packages](/microsoft/markitdown/tree/main/packages "packages") |  |  |
| [.dockerignore](/microsoft/markitdown/blob/main/.dockerignore ".dockerignore") | | [.dockerignore](/microsoft/markitdown/blob/main/.dockerignore ".dockerignore") |  |  |
| [.gitattributes](/microsoft/markitdown/blob/main/.gitattributes ".gitattributes") | | [.gitattributes](/microsoft/markitdown/blob/main/.gitattributes ".gitattributes") |  |  |
| [.gitignore](/microsoft/markitdown/blob/main/.gitignore ".gitignore") | | [.gitignore](/microsoft/markitdown/blob/main/.gitignore ".gitignore") |  |  |
| [.pre-commit-config.yaml](/microsoft/markitdown/blob/main/.pre-commit-config.yaml ".pre-commit-config.yaml") | | [.pre-commit-config.yaml](/microsoft/markitdown/blob/main/.pre-commit-config.yaml ".pre-commit-config.yaml") |  |  |
| [CODE\_OF\_CONDUCT.md](/microsoft/markitdown/blob/main/CODE_OF_CONDUCT.md "CODE_OF_CONDUCT.md") | | [CODE\_OF\_CONDUCT.md](/microsoft/markitdown/blob/main/CODE_OF_CONDUCT.md "CODE_OF_CONDUCT.md") |  |  |
| [Dockerfile](/microsoft/markitdown/blob/main/Dockerfile "Dockerfile") | | [Dockerfile](/microsoft/markitdown/blob/main/Dockerfile "Dockerfile") |  |  |
| [LICENSE](/microsoft/markitdown/blob/main/LICENSE "LICENSE") | | [LICENSE](/microsoft/markitdown/blob/main/LICENSE "LICENSE") |  |  |
| [README.md](/microsoft/markitdown/blob/main/README.md "README.md") | | [README.md](/microsoft/markitdown/blob/main/README.md "README.md") |  |  |
| [SECURITY.md](/microsoft/markitdown/blob/main/SECURITY.md "SECURITY.md") | | [SECURITY.md](/microsoft/markitdown/blob/main/SECURITY.md "SECURITY.md") |  |  |
| [SUPPORT.md](/microsoft/markitdown/blob/main/SUPPORT.md "SUPPORT.md") | | [SUPPORT.md](/microsoft/markitdown/blob/main/SUPPORT.md "SUPPORT.md") |  |  |
| View all files | | |

## Repository files navigation

* README
* Code of conduct
* MIT license
* Security

# MarkItDown

[![PyPI](https://camo.githubusercontent.com/124b95350d48b05db482b4a2153dc9cb06250d6e9272e121a6f3856a5159879d/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6d61726b6974646f776e2e737667)](https://pypi.org/project/markitdown/)
[![PyPI - Downloads](https://camo.githubusercontent.com/b358637622bf3aede990f9e2f7d2297d2cb2974ff07ba78c71de83a0dbaf1220/68747470733a2f2f696d672e736869656c64732e696f2f707970692f64642f6d61726b6974646f776e)](https://camo.githubusercontent.com/b358637622bf3aede990f9e2f7d2297d2cb2974ff07ba78c71de83a0dbaf1220/68747470733a2f2f696d672e736869656c64732e696f2f707970692f64642f6d61726b6974646f776e)
[![Built by AutoGen Team](https://camo.githubusercontent.com/e773e2d12920abb5d8b2fe1d05f510b9ba7c3c54969bc3e05b6f7e8f8705e71d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c7425323062792d4175746f47656e2532305465616d2d626c7565)](https://github.com/microsoft/autogen)

Tip

MarkItDown now offers an MCP (Model Context Protocol) server for integration with LLM applications like Claude Desktop. See [markitdown-mcp](https://github.com/microsoft/markitdown/tree/main/packages/markitdown-mcp) for more information.

Important

Breaking changes between 0.0.1 to 0.1.0:

* Dependencies are now organized into optional feature-groups (further details below). Use `pip install 'markitdown[all]'` to have backward-compatible behavior.
* convert\_stream() now requires a binary file-like object (e.g., a file opened in binary mode, or an io.BytesIO object). This is a breaking change from the previous version, where it previously also accepted text file-like objects, like io.StringIO.
* The DocumentConverter class interface has changed to read from file-like streams rather than file paths. *No temporary files are created anymore*. If you are the maintainer of a plugin, or custom DocumentConverter, you likely need to update your code. Otherwise, if only using the MarkItDown class or CLI (as in these examples), you should not need to change anything.

MarkItDown is a lightweight Python utility for converting various files to Markdown for use with LLMs and related text analysis pipelines. To this end, it is most comparable to [textract](https://github.com/deanmalmgren/textract), but with a focus on preserving important document structure and content as Markdown (including: headings, lists, tables, links, etc.) While the output is often reasonably presentable and human-friendly, it is meant to be consumed by text analysis 

[TRUNCATED]
Image test: 02dbeaf0.png
error: