Skill Tracer
Skills › Scientific Agent Skills › markitdown › file_formats.md

file_formats.md

296 lines · skills/markitdown/references/file_formats.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# File Formats and Conversion Behavior
2
3This reference targets Microsoft MarkItDown 0.1.8. "Built-in" means the converter ships in the `markitdown` package; some built-ins still require an optional dependency extra.
4

File Formats and Conversion Behavior

This reference targets Microsoft MarkItDown 0.1.8. "Built-in" means the converter ships in the markitdown package; some built-ins still require an optional dependency extra.

Raw lines 1 to 4
5## Installation by Format
6
7```bash
8# Full built-in feature set
9uv pip install "markitdown[all]==0.1.8"
11# Common document subset
12uv pip install "markitdown[pdf,docx,pptx,xlsx]==0.1.8"
14# Minimal package; suitable for core text/HTML/CSV/ZIP/EPUB/IPYNB paths
15uv pip install "markitdown==0.1.8"
16```

Installation by Format

# Full built-in feature set
uv pip install "markitdown[all]==0.1.8"

# Common document subset
uv pip install "markitdown[pdf,docx,pptx,xlsx]==0.1.8"

# Minimal package; suitable for core text/HTML/CSV/ZIP/EPUB/IPYNB paths
uv pip install "markitdown==0.1.8"
Raw lines 5 to 17
18## Built-in Converter Matrix
20| Input | Typical extensions/source | Extra | Main behavior | Important limitations/network |
21|---|---|---|---|---|
22| Plain text | `.txt`, `.md`, recognized text, JSON/XML text | Core | Decodes text while preserving content | JSON/XML are not guaranteed to be normalized or pretty-printed |
23| CSV | `.csv`, `text/csv` | Core | Dedicated CSV-to-Markdown table conversion | Very wide/large tables can create large Markdown |
24| HTML | `.html`, `.htm` | Core | Headings, links, lists, tables, and readable text | CSS layout, client-side rendering, and visual fidelity are not preserved |
25| RSS/Atom-like XML | feed content/URLs | Core | Feed-focused Markdown | Remote retrieval uses network if a URI is supplied |
26| Wikipedia page | Wikipedia URL | Core | Page-oriented Markdown | Network; URL-specific converter |
27| Bing result page | Bing search-result URL | Core | Search-result-oriented Markdown | Network; HTML and service behavior can change |
28| YouTube | watch, `youtu.be`, shorts or embed URLs | `youtube-transcription` for transcript | Metadata, description, and available transcript | Fetches YouTube page/transcript; captions may be absent or restricted |
29| ZIP | `.zip` | Core | Iterates members and invokes nested converters | Treat untrusted archives as hostile; output can expand substantially |
30| EPUB | `.epub` | Core | Book metadata and structured text | Complex styling, fixed layout, DRM, and interactive content are not preserved |
31| Jupyter Notebook | `.ipynb` | Core | Notebook cells and content to Markdown | Runtime state is not reproduced; cells remain inert text during conversion |
32| PDF | `.pdf` | `pdf` | Extracts existing text and tables | No built-in local OCR for scanned pages; multi-column order and complex tables require validation |
33| Word | `.docx` | `docx` | Headings, lists, links, tables, images/alt text, and OMML math | Track changes, floating layout, and visual pagination are not faithfully reproduced |
34| PowerPoint | `.pptx` | `pptx` | Slide text, tables, notes, and shape ordering | Animations and layout fidelity are lost; image description requires an LLM client |
35| Excel | `.xlsx` | `xlsx` | Worksheets rendered as Markdown tables | Formulas, charts, merged cells, and formatting require source-level validation |
36| Legacy Excel | `.xls` | `xls` | Worksheets rendered as Markdown tables | Legacy parser limitations; no visual workbook fidelity |
37| Outlook message | `.msg` | `outlook` | Message headers and body | Attachments and rich formatting may need separate handling |
38| Image | `.jpg`, `.jpeg`, `.png` | Core | Selected ExifTool metadata; optional LLM description | Built-in converter does not locally OCR text; image may be sent to an external LLM |
39| Audio/video-audio | `.wav`, `.mp3`, `.m4a`, `.mp4` | `audio-transcription` | Metadata plus speech transcript | Transcription uses Google Web Speech through `SpeechRecognition`; content leaves the machine |

Built-in Converter Matrix

InputTypical extensions/sourceExtraMain behaviorImportant limitations/network
Plain text.txt, .md, recognized text, JSON/XML textCoreDecodes text while preserving contentJSON/XML are not guaranteed to be normalized or pretty-printed
CSV.csv, text/csvCoreDedicated CSV-to-Markdown table conversionVery wide/large tables can create large Markdown
HTML.html, .htmCoreHeadings, links, lists, tables, and readable textCSS layout, client-side rendering, and visual fidelity are not preserved
RSS/Atom-like XMLfeed content/URLsCoreFeed-focused MarkdownRemote retrieval uses network if a URI is supplied
Wikipedia pageWikipedia URLCorePage-oriented MarkdownNetwork; URL-specific converter
Bing result pageBing search-result URLCoreSearch-result-oriented MarkdownNetwork; HTML and service behavior can change
YouTubewatch, youtu.be, shorts or embed URLsyoutube-transcription for transcriptMetadata, description, and available transcriptFetches YouTube page/transcript; captions may be absent or restricted
ZIP.zipCoreIterates members and invokes nested convertersTreat untrusted archives as hostile; output can expand substantially
EPUB.epubCoreBook metadata and structured textComplex styling, fixed layout, DRM, and interactive content are not preserved
Jupyter Notebook.ipynbCoreNotebook cells and content to MarkdownRuntime state is not reproduced; cells remain inert text during conversion
PDF.pdfpdfExtracts existing text and tablesNo built-in local OCR for scanned pages; multi-column order and complex tables require validation
Word.docxdocxHeadings, lists, links, tables, images/alt text, and OMML mathTrack changes, floating layout, and visual pagination are not faithfully reproduced
PowerPoint.pptxpptxSlide text, tables, notes, and shape orderingAnimations and layout fidelity are lost; image description requires an LLM client
Excel.xlsxxlsxWorksheets rendered as Markdown tablesFormulas, charts, merged cells, and formatting require source-level validation
Legacy Excel.xlsxlsWorksheets rendered as Markdown tablesLegacy parser limitations; no visual workbook fidelity
Outlook message.msgoutlookMessage headers and bodyAttachments and rich formatting may need separate handling
Image.jpg, .jpeg, .pngCoreSelected ExifTool metadata; optional LLM descriptionBuilt-in converter does not locally OCR text; image may be sent to an external LLM
Audio/video-audio.wav, .mp3, .m4a, .mp4audio-transcriptionMetadata plus speech transcriptTranscription uses Google Web Speech through SpeechRecognition; content leaves the machine
Raw lines 18 to 40
41### Formats commonly overstated
43- The 0.1.8 built-in `ImageConverter` accepts JPEG and PNG, not GIF or WebP.
44- Built-in PDF conversion extracts a text layer; Tesseract is not part of MarkItDown's PDF path.
45- The package does not promise page ranges, bounding boxes, coordinates, or pixel-faithful output.
46- JSON and XML are text-based inputs, not schema-aware transformations.
47- A successful conversion does not imply complete figure, equation, table, or reading-order recovery.

Formats commonly overstated

  • The 0.1.8 built-in ImageConverter accepts JPEG and PNG, not GIF or WebP.
  • Built-in PDF conversion extracts a text layer; Tesseract is not part of MarkItDown's PDF path.
  • The package does not promise page ranges, bounding boxes, coordinates, or pixel-faithful output.
  • JSON and XML are text-based inputs, not schema-aware transformations.
  • A successful conversion does not imply complete figure, equation, table, or reading-order recovery.
Raw lines 41 to 48
51### Built-in extraction
53```python
54from markitdown import MarkItDown
56result = MarkItDown().convert_local("paper.pdf")
57print(result.markdown)
58```
60Use for born-digital PDFs where text is selectable. MarkItDown 0.1.5 improved aligned/wide table output and partially numbered lists; 0.1.6 fixed linear memory growth across PDF pages.

Built-in extraction

from markitdown import MarkItDown

result = MarkItDown().convert_local("paper.pdf")
print(result.markdown)

Use for born-digital PDFs where text is selectable. MarkItDown 0.1.5 improved aligned/wide table output and partially numbered lists; 0.1.6 fixed linear memory growth across PDF pages.

Raw lines 51 to 61
62### Scanned PDFs
64Choose one:
661. `markitdown-ocr==0.1.1` with an approved vision provider
672. Azure Document Intelligence
683. Azure Content Understanding
694. A local OCR/layout parser when content cannot leave the environment
71Do not claim OCR was performed unless the selected path actually supplied it.

Scanned PDFs

Choose one:

  1. markitdown-ocr==0.1.1 with an approved vision provider
  2. Azure Document Intelligence
  3. Azure Content Understanding
  4. A local OCR/layout parser when content cannot leave the environment

Do not claim OCR was performed unless the selected path actually supplied it.

Raw lines 62 to 72
73### Validate
75- Reading order in multi-column papers
76- Equations, superscripts, and symbols
77- Table headers and row alignment
78- Figure captions and footnotes
79- References and hyperlinks
80- Missing pages or empty scanned sections

Validate

  • Reading order in multi-column papers
  • Equations, superscripts, and symbols
  • Table headers and row alignment
  • Figure captions and footnotes
  • References and hyperlinks
  • Missing pages or empty scanned sections
Raw lines 73 to 81
82## DOCX
84Install:
86```bash
87uv pip install "markitdown[docx]==0.1.8"
88```
90Version 0.1.2 added DOCX math-equation rendering. Conversion is semantic, not page-layout preserving.
92Validate:
94- Heading levels and list nesting
95- Tables and merged cells
96- OMML equations
97- Hyperlinks and image alt text
98- Footnotes/endnotes
99- Tracked changes and comments
101For custom Mammoth mapping:
103```python
104from markitdown import MarkItDown
106converter = MarkItDown(style_map="p[style-name='Abstract'] => blockquote.abstract")
107result = converter.convert_local("manuscript.docx")
108```

DOCX

Install:

uv pip install "markitdown[docx]==0.1.8"

Version 0.1.2 added DOCX math-equation rendering. Conversion is semantic, not page-layout preserving.

Validate:

  • Heading levels and list nesting
  • Tables and merged cells
  • OMML equations
  • Hyperlinks and image alt text
  • Footnotes/endnotes
  • Tracked changes and comments

For custom Mammoth mapping:

from markitdown import MarkItDown

converter = MarkItDown(style_map="p[style-name='Abstract'] => blockquote.abstract")
result = converter.convert_local("manuscript.docx")
Raw lines 82 to 109
110## PPTX
112Install:
114```bash
115uv pip install "markitdown[pptx]==0.1.8"
116```
118The converter orders shapes to approximate reading order and extracts textual slide content. Optional `llm_client`, `llm_model`, and `llm_prompt` values can describe image content.
120Validate:
122- Slide order and boundaries
123- Speaker notes
124- Grouped/overlapping shapes
125- Tables and chart labels
126- Images containing essential text
127- Content conveyed only by position, color, or animation

PPTX

Install:

uv pip install "markitdown[pptx]==0.1.8"

The converter orders shapes to approximate reading order and extracts textual slide content. Optional llm_client, llm_model, and llm_prompt values can describe image content.

Validate:

  • Slide order and boundaries
  • Speaker notes
  • Grouped/overlapping shapes
  • Tables and chart labels
  • Images containing essential text
  • Content conveyed only by position, color, or animation
Raw lines 110 to 128
129## XLSX and XLS
131Install:
133```bash
134uv pip install "markitdown[xlsx,xls]==0.1.8"
135```
137The result is useful for textual review and LLM ingestion, but it is not a workbook round trip.
139Validate:
141- Sheet names and order
142- Hidden rows, columns, and sheets
143- Merged cells
144- Formula text versus cached/displayed values
145- Date/number interpretation
146- Charts, images, comments, and conditional formatting
148The 0.1.8 XLSX converter reads **all worksheets** (`sheet_name=None`); hiding a
149sheet in Excel is not an extraction filter. Inventory sheet visibility before
150sharing the Markdown and use an explicitly selected workbook copy if only certain
151sheets belong in the output.
153Formula results depend on values cached in the workbook; MarkItDown does not
154recalculate formulas. Missing or stale caches can yield blank or outdated cells.
155For trusted workbooks, recalculate and save with a compatible spreadsheet engine
156when current formula results are required, then compare key cells with the source.
157For numeric analysis, read the workbook directly with a dataframe or spreadsheet library after using MarkItDown for orientation.

XLSX and XLS

Install:

uv pip install "markitdown[xlsx,xls]==0.1.8"

The result is useful for textual review and LLM ingestion, but it is not a workbook round trip.

Validate:

  • Sheet names and order
  • Hidden rows, columns, and sheets
  • Merged cells
  • Formula text versus cached/displayed values
  • Date/number interpretation
  • Charts, images, comments, and conditional formatting

The 0.1.8 XLSX converter reads all worksheets (sheet_name=None); hiding a sheet in Excel is not an extraction filter. Inventory sheet visibility before sharing the Markdown and use an explicitly selected workbook copy if only certain sheets belong in the output.

Formula results depend on values cached in the workbook; MarkItDown does not recalculate formulas. Missing or stale caches can yield blank or outdated cells. For trusted workbooks, recalculate and save with a compatible spreadsheet engine when current formula results are required, then compare key cells with the source. For numeric analysis, read the workbook directly with a dataframe or spreadsheet library after using MarkItDown for orientation.

Raw lines 129 to 158
159## Images
161The built-in converter supports `.jpg`, `.jpeg`, and `.png`.
163Without an LLM client, output may contain only selected metadata and can be empty when ExifTool is unavailable or the file has no relevant metadata.
165```python
166from markitdown import MarkItDown
168result = MarkItDown(exiftool_path="/opt/homebrew/bin/exiftool").convert_local(
169 "figure.png"
171```
173The path above is illustrative; discover the executable with `shutil.which("exiftool")` or use its reviewed absolute path. Use only a trusted ExifTool executable. MarkItDown 0.1.3 added a safety requirement for ExifTool 12.24 or later.
175Vision descriptions and OCR are external-processing paths; see `cloud_and_ocr.md`.

Images

The built-in converter supports .jpg, .jpeg, and .png.

Without an LLM client, output may contain only selected metadata and can be empty when ExifTool is unavailable or the file has no relevant metadata.

from markitdown import MarkItDown

result = MarkItDown(exiftool_path="/opt/homebrew/bin/exiftool").convert_local(
    "figure.png"
)

The path above is illustrative; discover the executable with shutil.which("exiftool") or use its reviewed absolute path. Use only a trusted ExifTool executable. MarkItDown 0.1.3 added a safety requirement for ExifTool 12.24 or later.

Vision descriptions and OCR are external-processing paths; see cloud_and_ocr.md.

Raw lines 159 to 176
Runs code bin/exiftool :168
177## Audio
179Accepted extensions are `.wav`, `.mp3`, `.m4a`, and `.mp4`.
181```bash
182uv pip install "markitdown[audio-transcription]==0.1.8"
183```
185Install FFmpeg separately for MP3/M4A/MP4 decoding; the Python extra does not supply that executable. WAV can be decoded directly.
187The tested `SpeechRecognition==3.17.0` legacy recognizer defaults to an HTTP Google Web Speech endpoint. This is not the authenticated Google Cloud Speech-to-Text API; do not send confidential recordings through this path.
189The implementation converts supported audio to a `SpeechRecognition` input and calls `recognize_google()`. This is not offline transcription. Use a separately reviewed local or approved secure transcription workflow for confidential recordings.
191The converter does not provide speaker diarization, timestamps, confidence values, or domain adaptation.

Audio

Accepted extensions are .wav, .mp3, .m4a, and .mp4.

uv pip install "markitdown[audio-transcription]==0.1.8"

Install FFmpeg separately for MP3/M4A/MP4 decoding; the Python extra does not supply that executable. WAV can be decoded directly.

The tested SpeechRecognition==3.17.0 legacy recognizer defaults to an HTTP Google Web Speech endpoint. This is not the authenticated Google Cloud Speech-to-Text API; do not send confidential recordings through this path.

The implementation converts supported audio to a SpeechRecognition input and calls recognize_google(). This is not offline transcription. Use a separately reviewed local or approved secure transcription workflow for confidential recordings.

The converter does not provide speaker diarization, timestamps, confidence values, or domain adaptation.

Raw lines 177 to 192
193## YouTube
195```bash
196uv pip install "markitdown[youtube-transcription]==0.1.8"
197markitdown "https://www.youtube.com/watch?v=VIDEO_ID" -o transcript.md
198```
200Behavior:
202- Downloads the page
203- Extracts title, description, and selected metadata
204- Requests an available transcript
205- Prefers English, then an available language, with translation fallback
207Availability depends on YouTube, the video, geography, cookies/network policy, and transcript permissions.

YouTube

uv pip install "markitdown[youtube-transcription]==0.1.8"
markitdown "https://www.youtube.com/watch?v=VIDEO_ID" -o transcript.md

Behavior:

  • Downloads the page
  • Extracts title, description, and selected metadata
  • Requests an available transcript
  • Prefers English, then an available language, with translation fallback

Availability depends on YouTube, the video, geography, cookies/network policy, and transcript permissions.

Raw lines 193 to 208
209## CSV, JSON, and XML
211CSV has a dedicated table converter:
213```python
214result = MarkItDown().convert_local("measurements.csv")
215```
217JSON and XML are generally handled as text-like formats. If downstream work needs validated records, parse with `json`, `defusedxml`, or a schema-aware library rather than parsing the generated Markdown.

CSV, JSON, and XML

CSV has a dedicated table converter:

result = MarkItDown().convert_local("measurements.csv")

JSON and XML are generally handled as text-like formats. If downstream work needs validated records, parse with json, defusedxml, or a schema-aware library rather than parsing the generated Markdown.

Raw lines 209 to 218
219## ZIP and EPUB
221ZIP conversion invokes MarkItDown recursively for archive members. Apply:
223- Maximum archive size
224- Maximum member count
225- Maximum nested depth
226- Compression-ratio limits
227- Per-member type allowlists
229Do not use conversion as an archive-security boundary.
231EPUB conversion targets textual book structure. DRM-protected or fixed-layout publications may fail or lose essential visual information.

ZIP and EPUB

ZIP conversion invokes MarkItDown recursively for archive members. Apply:

  • Maximum archive size
  • Maximum member count
  • Maximum nested depth
  • Compression-ratio limits
  • Per-member type allowlists

Do not use conversion as an archive-security boundary.

EPUB conversion targets textual book structure. DRM-protected or fixed-layout publications may fail or lose essential visual information.

Raw lines 219 to 232
233## Remote and Special Sources
235`convert_uri()` accepts:
237- `file:`
238- `data:`
239- `http:`
240- `https:`
242`file:` and `data:` are still potentially dangerous when user-controlled. `http:` and `https:` require SSRF, redirect, size, and timeout controls. See `security.md`.

Remote and Special Sources

convert_uri() accepts:

  • file:
  • data:
  • http:
  • https:

file: and data: are still potentially dangerous when user-controlled. http: and https: require SSRF, redirect, size, and timeout controls. See security.md.

Raw lines 233 to 243
244## Azure Document Intelligence Format Set
246The 0.1.8 integration supports:
248- Documents: DOCX, PPTX, XLSX
249- OCR/layout: PDF, JPEG, PNG, BMP, TIFF
250- HTML is represented in the enum but is not in the converter's default file-type list
252The API version now defaults to the installed SDK choice (`2024-11-30` with tested `azure-ai-documentintelligence==1.0.2`). Document bytes are sent to Azure.

Azure Document Intelligence Format Set

The 0.1.8 integration supports:

  • Documents: DOCX, PPTX, XLSX
  • OCR/layout: PDF, JPEG, PNG, BMP, TIFF
  • HTML is represented in the enum but is not in the converter's default file-type list

The API version now defaults to the installed SDK choice (2024-11-30 with tested azure-ai-documentintelligence==1.0.2). Document bytes are sent to Azure.

Raw lines 244 to 253
254## Azure Content Understanding Format Set
256The 0.1.8 integration can route:
258- Documents: PDF, DOCX, PPTX, XLSX, HTML, TXT, Markdown, RTF, XML
259- Email: EML, MSG
260- Images: JPEG, PNG, BMP, TIFF, HEIF/HEIC
261- Video: MP4, M4V, MOV, AVI, MKV, WebM, FLV, WMV
262- Audio: WAV, MP3, M4A, FLAC, OGG, AAC, WMA
264Support here means Azure Content Understanding routing, not local built-in parsing. Each routed conversion is an external, potentially billable operation.

Azure Content Understanding Format Set

The 0.1.8 integration can route:

  • Documents: PDF, DOCX, PPTX, XLSX, HTML, TXT, Markdown, RTF, XML
  • Email: EML, MSG
  • Images: JPEG, PNG, BMP, TIFF, HEIF/HEIC
  • Video: MP4, M4V, MOV, AVI, MKV, WebM, FLV, WMV
  • Audio: WAV, MP3, M4A, FLAC, OGG, AAC, WMA

Support here means Azure Content Understanding routing, not local built-in parsing. Each routed conversion is an external, potentially billable operation.

Raw lines 254 to 265
266## Format Hints
268When bytes lack a meaningful filename:
270```python
271from markitdown import MarkItDown, StreamInfo
273with open("upload.bin", "rb") as stream:
274 result = MarkItDown().convert_stream(
275 stream,
276 stream_info=StreamInfo(
277 extension=".pdf",
278 mimetype="application/pdf",
279 filename="upload.pdf",
280 ),
281 )
282```
284CLI equivalents:
286```bash
287markitdown < upload.bin -x .pdf -m application/pdf -o output.md
288```

Format Hints

When bytes lack a meaningful filename:

from markitdown import MarkItDown, StreamInfo

with open("upload.bin", "rb") as stream:
    result = MarkItDown().convert_stream(
        stream,
        stream_info=StreamInfo(
            extension=".pdf",
            mimetype="application/pdf",
            filename="upload.pdf",
        ),
    )

CLI equivalents:

markitdown < upload.bin -x .pdf -m application/pdf -o output.md
Raw lines 266 to 289
290## Source Basis
292- Official 0.1.8 README: https://github.com/microsoft/markitdown/blob/v0.1.8/README.md
293- Built-in converter registry: https://github.com/microsoft/markitdown/blob/v0.1.8/packages/markitdown/src/markitdown/_markitdown.py
294- Release history: https://github.com/microsoft/markitdown/releases
296- SpeechRecognition 3.17.0 legacy Google request: https://github.com/Uberi/speech_recognition/blob/3.17.0/speech_recognition/recognizers/google.py

Source Basis

  • Official 0.1.8 README: https://github.com/microsoft/markitdown/blob/v0.1.8/README.md
  • Built-in converter registry: https://github.com/microsoft/markitdown/blob/v0.1.8/packages/markitdown/src/markitdown/_markitdown.py
  • Release history: https://github.com/microsoft/markitdown/releases
  • SpeechRecognition 3.17.0 legacy Google request: https://github.com/Uberi/speech_recognition/blob/3.17.0/speech_recognition/recognizers/google.py
Raw lines 290 to 296