> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markpdf.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported formats

> What enters, how it is detected and how the ZIP works.

# Supported formats

## Entries

| Format     | Extension | Notes                                       |
| ---------- | --------- | ------------------------------------------- |
| Word       | `.docx`   |                                             |
| Excel      | `.xlsx`   |                                             |
| PowerPoint | `.pptx`   |                                             |
| CSV        | `.csv`    | Converts to Markdown table.                 |
| Text       | `.txt`    | It is returned as is, normalized.           |
| ZIP        | `.zip`    | Container with a document supported inside. |

## Auto detection

With `input_format=auto` (default) the order is:

<Steps>
  <Step title="Extension">
    The extension of `filename` is looked at.
  </Step>

  <Step title="Content-Type">
    If the extension is not enough, the header `content-type` is used.
  </Step>

  <Step title="Error 415">
    If nothing matches, it responds `415` asking you to set `input_format`.
  </Step>
</Steps>

<Tip>
  If you know the format, set `input_format` explicitly. It is faster and avoids ambiguities.
</Tip>

## ZIP

When you send a ZIP, **the first supported document** it finds is extracted.

* Hidden folders and files (those starting with `.`) are ignored.
* If ZIP has more entries than allowed, `413` responds.
* If no member is a supported format, reply `415`.
* If the internal document exceeds the size limit, respond `413`.

<Note>
  The ZIP is for packaging **one** document, not batch processing. For multiple documents, make a request for each one.
</Note>

## CSV to Markdown

The CSV is converted to a Markdown table. Cells are escaped (`|` and line breaks) and trimmed if they are very long, to keep the table readable.

## What is preserved and what is lost due to formatting

Converting to Markdown always means losing some visual fidelity — Markdown
It has no concept of a page, exact source or absolute position. This table
summarizes what survives reasonably well and what is flattened or discarded:

| Format                 | It is preserved                                                                                           | Is lost or flattened                                                                                                                                               |
| ---------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Word (.docx)**       | Headings (`Heading 1`-`Heading 2` -> `#`-`##`), bold/italics, numbered and bulleted lists, tables, links. | Comments and track changes, footnotes are flattened at the end or lost depending on the converter, headers/footers, section breaks.                                |
| **Excel (.xlsx)**      | Each sheet is converted to a Markdown table; formulas are solved to their calculated values.              | Formulas themselves (just the result), conditional formatting, embedded graphics, multiple sheets are concatenated sequentially (there are no "tabs" in Markdown). |
| **PowerPoint (.pptx)** | Text on each svalide in order, titles as headings, bulleted lists.                                        | Visual design, position of text boxes, images and graphics (only the accompanying text), animations and transitions.                                               |
| **CSV**                | All rows and columns as Markdown table; Long cells are cropped for readability.                           | Data types (everything becomes text), numeric format/original date.                                                                                                |
| **TXT**                | The full text, normalized (line breaks, spaces).                                                          | Not applicable — there is no structure to lose.                                                                                                                    |
| **ZIP**                | The internal supported document is converted the same as if it had been uploaded loose.                   | Everything else within ZIP (only the first supported document found is processed).                                                                                 |

<Tip>
  If your use case depends on preserving complex tables or multi-column layouts
  Complete fidelity comparison by mode.
</Tip>

## Real use cases by format

* **PDF + `fast`**: bulk ingestion for a RAG search index where
  Speed ​​matters more than preserving every nuance of layout.
* **DOCX for legal contracts**: `clean=true` (default) is especially useful
  here because contracts usually have repeated headers/footers in each
  page that dirty the Markdown if they are not normalized.
* **XLSX of financial reports**: each sheet becomes a Markdown table
  independent — useful for a LLM to reason about a sheet of "Q3
  Revenue" without having to parse a binary file.
* **PPTX from sales decks**: extracting only the text from the svalides is
  enough for an agent to summarize the content of a presentation without
  need to process images.

## Troubleshooting

| Symptom                                                       | Cause                                                                                                                   | Solution                                                                                                                                                      |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `415` with a file that "should" work                          | The extension does not match the actual content, or the client's `content-type` is generic (`application/octet-stream`) | Set `input_format` explicitly instead of relying on `auto`.                                                                                                   |
| Excel tables come out as plain text instead of Markdown table | The sheet has merged cells or a very irregular layout that the converter cannot map to clean rows/columns               | Simplify the layout of the source sheet, or accept the output as text and post-process.                                                                       |
| ZIP cannot find any vavalid documents                         | The files inside the ZIP are in nested folders further than expected, or they all start with `.` (hidden)               | Verify that the supported document is in the root or a visible folder of the ZIP.                                                                             |
| The CSV comes out with misaligned columns                     | CSV uses a non-comma delilimitr (`;`, `	`) without declaring it                                                         | Normalize the CSV to comma delilimitr before uploading it, or use explicit `input_format=csv` to force the correct parser if your CSV uses consistent quotes. |
