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

Request Modes

ModeContent typeFields
Inline payloadapplication/jsonxml, xslt
File uploadmultipart/form-dataxmlFile, 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

{
  "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>"
}