Generic XML only: this page does not draw fiscal documents — no NF-e DANFE and no CFDI invoice layout. Their XML prints here as code or a tree.
Open an XML file to see how it will look in the PDF. The file stays in this tab.
XML to PDF prints an XML document as a PDF you can read, share or archive: either the XML itself, re-indented with syntax colors, or a tree outline of elements, attributes and values. It works for any XML and does not make fiscal invoice layouts such as NF-e DANFE or CFDI.
Last updated:
How it works
Open the XML
Press Choose an XML file or drop it; .xml.gz files are unpacked. The text that goes into the PDF appears below.
Pick the layout
Pretty-printed XML keeps the markup with Syntax colors; Tree outline shows element names, attributes and text joined by tree lines. Set Paper, Landscape, Text size and Page numbers.
Download the PDF
Press Download PDF. Long lines wrap inside the code block and pages break by themselves.
Features
Content never changes
Pretty-printing only re-indents whitespace between tags; text, CDATA, comments and elements with xml:space="preserve" are copied as they are.
Tree outline for people
Element: value lines like price [currency="EUR"]: 39.90 are easier for non-developers than raw tags, and long values are shortened with an ellipsis.
Errors pointed out
A file that is not well-formed is not printed half-way: you get the line, column and reason, such as an unclosed tag.
Real text in the PDF
The PDF is typeset with embedded fonts, so you can search it and copy element names; nothing is turned into an image.
Not a fiscal renderer
Brazilian NF-e and Mexican CFDI XML print as code or a tree here, not as the official DANFE or invoice layout tax authorities define.
Limits & privacy
XML files up to 5 MB are accepted (also gzipped). The PDF uses the site’s own typesetter in a background worker; Cancel stops it. Entities are expanded with a size limit, external entities and DTDs are never fetched.
The XML stays in this browser tab and is not uploaded. See the privacy page.
Example: a product feed, catalog.xml, with 40 products in Tree outline becomes a 3-page PDF where each product reads product [id=“P-100”] with name, price and tags indented under it.
FAQ
How do I convert XML to PDF?
Open the XML here, choose Pretty-printed XML or Tree outline and press Download PDF.
Can I print an NF-e as DANFE or a CFDI invoice?
No, this page does not make DANFE or CFDI layouts. Those are regulated layouts with QR codes and fixed fields; use your accounting system or the tax authority’s viewer for them.
Does it apply my XSLT stylesheet?
No, an XSLT stylesheet is not applied. The PDF shows the document itself, as code or a tree, which works for any XML without a stylesheet.
How large can the file be?
Up to 5 MB of XML. A file that size makes a long PDF; for browsing big files, the XML Viewer is faster.
Can I edit the XML first?
Yes, edit it in the XML Editor, save, and open the result here.
Is my XML uploaded?
No, your XML is not uploaded. It is parsed in your browser and the PDF is made on your device.