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

# XML To HTML Guide

> Transform XML with XSLT and use the generated HTML in your own workflows.

Use `POST /convert/xml-to-html` when you already have XML data and an XSLT stylesheet that describes the output format.

## Request Modes

| Mode           | Content type          | Fields                |
| -------------- | --------------------- | --------------------- |
| Inline payload | `application/json`    | `xml`, `xslt`         |
| File upload    | `multipart/form-data` | `xmlFile`, `xsltFile` |

## Output

The endpoint returns:

* `text/html` by default
* JSON metadata when you send `Accept: application/json`

## Limits

* XML is limited to **5 MB**
* XSLT is limited to **1 MB**
* Credit cost is **1**

## Typical Use Cases

* Converting structured business XML into email-ready or browser-ready HTML
* Generating HTML first, then sending the result into `POST /convert/html-to-pdf`
* Keeping layout logic in XSLT while your application only passes data

## JSON Example

```json theme={null}
{
  "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><invoice><number>INV-1001</number></invoice>",
  "xslt": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"/\"><html><body><h1><xsl:value-of select=\"invoice/number\" /></h1></body></html></xsl:template></xsl:stylesheet>"
}
```
