Title: Python MarkItDown: Convert Documents Into LLM-Ready Markdown – Real Python
Open Graph Title: Python MarkItDown: Convert Documents Into LLM-Ready Markdown – Real Python
Description: Get started with Python MarkItDown to turn PDFs, Office files, images, and URLs into clean, LLM-ready Markdown in seconds.
Open Graph Description: Get started with Python MarkItDown to turn PDFs, Office files, images, and URLs into clean, LLM-ready Markdown in seconds.
Mail addresses
?subject=Python article for you&body=Python MarkItDown: Convert Documents Into LLM-Ready Markdown on Real Python
https://realpython.com/python-markitdown/
Opengraph URL: https://realpython.com/python-markitdown/
X: @realpython
Domain: realpython.com
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "Python MarkItDown: Convert Documents Into LLM-Ready Markdown",
"image": {
"@type": "ImageObject",
"url": "https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg",
"width": 1920,
"height": 1080
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://realpython.com/python-markitdown/",
"lastReviewed": "2026-10-15",
"author": {
"@type": "Person",
"name": "Leodanis Pozo Ramos",
"image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
"url": "https://realpython.com/team/lpozoramos/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
"reviewedBy": [
{
"@type": "Person",
"name": "Aldren Santos",
"image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
"url": "https://realpython.com/team/asantos/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Brenda Weleschuk",
"image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
"url": "https://realpython.com/team/bweleschuk/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Bartosz Zaczy\u0144ski",
"image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
"url": "https://realpython.com/team/bzaczynski/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Martin Breuss",
"image": "https://realpython.com/cdn-cgi/image/width=456,height=456,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/martin_breuss_python_square.efb2b07faf9f.jpg",
"url": "https://realpython.com/team/mbreuss/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Philipp Acsany",
"image": "https://realpython.com/cdn-cgi/image/width=1920,height=1920,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg",
"url": "https://realpython.com/team/pacsany/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
}
]
},
"datePublished": "2025-11-05T14:00:00+00:00",
"dateModified": "2026-10-15T19:56:13.221765+00:00",
"publisher": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": {
"@type": "ImageObject",
"url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
"width": 512,
"height": 512
},
"description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
"slogan": "Become a Python Expert",
"email": "info@realpython.com",
"sameAs": [
"https://github.com/realpython",
"https://www.youtube.com/realpython",
"https://twitter.com/realpython",
"https://x.com/realpython",
"https://www.linkedin.com/company/realpython-com/",
"https://www.facebook.com/learnrealpython",
"https://www.instagram.com/realpython",
"https://www.tiktok.com/@realpython.com"
]
},
"author": {
"@type": "Person",
"name": "Leodanis Pozo Ramos",
"image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
"url": "https://realpython.com/team/lpozoramos/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
"description": "Get started with Python MarkItDown to turn PDFs, Office files, images, and URLs into clean, LLM-ready Markdown in seconds.",
"hasPart": {
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "When should you pick MarkItDown over Pandoc?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eChoose MarkItDown when you need fast, LLM-ready Markdown from multiple input formats and prioritize structure over fidelity. Use Pandoc when you need precise formatting control or a wider range of output formats.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "How do you install MarkItDown with optional features?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eYou run \u003ccode\u003epython -m pip install 'markitdown[all]'\u003c/code\u003e to include all optional features. When you only need specific format handlers, you can install a subset like \u003ccode\u003e'markitdown[pdf,pptx,docx]'\u003c/code\u003e.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "How do you convert a file from the CLI and save the result?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eYou run \u003ccode\u003emarkitdown \u0026lt;path\u0026gt;\u003c/code\u003e to print Markdown, and add \u003ccode\u003e-o \u0026lt;output_file.md\u0026gt;\u003c/code\u003e to write the output to your disk. You can also pipe input or use input redirection to feed data to \u003ccode\u003emarkitdown\u003c/code\u003e.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "How do you convert documents from Python code?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eTo convert documents from Python code, you create a \u003ccode\u003eMarkItDown\u003c/code\u003e instance and call its \u003ccode\u003e.convert()\u003c/code\u003e method with a path or URL. Then, you access the \u003ccode\u003e.markdown\u003c/code\u003e attribute for the conversion result.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "Can you integrate MarkItDown with LLMs for images and OCR?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eYes, you can use Azure Document Intelligence to perform OCR on image formats such as PDF, JPEG, PNG, BMP, and TIFF. Alternatively, you can use a custom prompt and an OCR-capable LLM.\u003c/p\u003e"
}
}
]
}
}
| author | Real Python |
| theme-color | #18354c |
| color-scheme | light dark |
| twitter:card | summary_large_image |
| twitter:image | https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg |
| og:image | https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg |
| twitter:creator | @realpython |
| og:type | article |
| og:site_name | Real Python |
| apple-mobile-web-app-title | Real Python |
Links:
Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover
Robots: max-image-preview:large