> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/microsoft/markitdown/llms.txt
> Use this file to discover all available pages before exploring further.

# Converters Overview

> Overview of MarkItDown's converter architecture and available document converters

## Architecture

MarkItDown uses a modular converter architecture where each converter is responsible for handling specific file types. All converters inherit from the `DocumentConverter` base class and implement two key methods:

* `accepts()` - Determines if the converter can handle a given file based on MIME type, extension, or URL
* `convert()` - Performs the actual conversion to Markdown

## Base Classes

### DocumentConverter

The abstract base class for all converters.

**Key Methods:**

```python theme={null}
def accepts(
    self,
    file_stream: BinaryIO,
    stream_info: StreamInfo,
    **kwargs: Any,
) -> bool:
    """Determine if this converter can handle the document."""
```

```python theme={null}
def convert(
    self,
    file_stream: BinaryIO,
    stream_info: StreamInfo,
    **kwargs: Any,
) -> DocumentConverterResult:
    """Convert the document to Markdown."""
```

### DocumentConverterResult

The result object returned by all converters.

**Properties:**

* `markdown` (str) - The converted Markdown text
* `title` (Optional\[str]) - Optional document title extracted from the file
* `text_content` (str) - Deprecated alias for `markdown`

## Available Converters

### Document Formats

<CardGroup cols={2}>
  <Card title="PDF" icon="file-pdf" href="./pdf-converter">
    Convert PDF files with table extraction support
  </Card>

  <Card title="DOCX" icon="file-word" href="./docx-converter">
    Convert Word documents preserving styles and tables
  </Card>

  <Card title="PPTX" icon="file-powerpoint" href="./pptx-converter">
    Convert PowerPoint presentations with images and charts
  </Card>

  <Card title="XLSX/XLS" icon="file-excel" href="./xlsx-converter">
    Convert Excel spreadsheets to Markdown tables
  </Card>
</CardGroup>

### Media Formats

<CardGroup cols={2}>
  <Card title="Images" icon="image" href="./image-converter">
    Extract metadata and generate AI descriptions for images
  </Card>

  <Card title="Audio" icon="microphone" href="./audio-converter">
    Transcribe audio files and extract metadata
  </Card>
</CardGroup>

### Web & Markup

<CardGroup cols={2}>
  <Card title="HTML" icon="code" href="./html-converter">
    Convert HTML to clean Markdown
  </Card>

  <Card title="Other Converters" icon="ellipsis" href="./other-converters">
    Plain text, CSV, Jupyter notebooks, ZIP archives, EPUB, RSS, Wikipedia, YouTube, Bing search, Outlook messages, and Azure Document Intelligence
  </Card>
</CardGroup>

## Converter Selection

MarkItDown automatically selects the appropriate converter based on:

1. **File Extension** - Primary method (e.g., `.pdf`, `.docx`)
2. **MIME Type** - Secondary method from HTTP headers or file detection
3. **URL Pattern** - For special web converters (Wikipedia, YouTube, Bing)
4. **Content Inspection** - Some converters peek at file content to confirm format

Converters are tried in registration order until one accepts the file.

## Common Options

Many converters accept these optional parameters via `**kwargs`:

<ParamField path="llm_client" type="OpenAI client">
  OpenAI-compatible client for AI-powered features (image captioning, etc.)
</ParamField>

<ParamField path="llm_model" type="str">
  Model name to use with the LLM client (e.g., "gpt-4o")
</ParamField>

<ParamField path="llm_prompt" type="str">
  Custom prompt for LLM operations
</ParamField>

<ParamField path="exiftool_path" type="str">
  Path to exiftool binary for metadata extraction
</ParamField>

<ParamField path="keep_data_uris" type="bool" default="False">
  Embed images as base64 data URIs instead of file references
</ParamField>

## Error Handling

Converters may raise these exceptions:

* `MissingDependencyException` - Required dependency not installed
* `FileConversionException` - Conversion failed for a supported file type
* `UnsupportedFormatException` - No converter available for the file type
