HomeXML Viewer

XML Viewer & Formatter

Paste or upload XML — get a collapsible tree view and formatted output instantly.

Free: 500KB limit. Go Pro →

Ctrl+Enter to parse

Parse XML to see tree view

What Is XML?

XML (Extensible Markup Language) is a widely used markup language designed for storing and transporting structured data. Unlike HTML, which is focused on displaying data, XML is designed to carry data in a self-descriptive, platform-independent format. It is the backbone of many industry standards including XRechnung, ZUGFeRD, SOAP web services, SVG graphics, RSS feeds, and configuration files across virtually all programming ecosystems.

XML documents follow a strict hierarchical structure of nested elements enclosed in tags. Each element can have attributes, child elements, and text content. Well-formed XML must follow rules including properly nested tags, a single root element, and case-sensitive tag names. This strict structure makes XML ideal for machine parsing while remaining human-readable — a quality that has kept it relevant for over two decades.

In the German e-invoicing landscape, XML is particularly important: both the XRechnung standard (based on UBL and CII) and the ZUGFeRD hybrid PDF format embed structured invoice data as XML. Understanding XML structure is essential for anyone working with electronic invoices, KOSIT validators, or government procurement systems.

How to Use This XML Viewer

Our XML Viewer is designed for developers, accountants, and IT professionals who need to quickly inspect XML documents. Here’s how to use it:

  1. Paste or Upload — Paste your XML content directly into the input field, or click “Upload File” to select an XML file from your device.
  2. Parse & Format — Click the “Parse & Format XML” button or press Ctrl+Enter. The tool validates your XML syntax and builds an interactive tree view.
  3. Explore the Tree — Navigate the collapsible tree view to inspect element names and values. Click the chevron icons to expand or collapse nested sections.
  4. Copy Formatted Output — Use the “Copy formatted” button to copy the cleaned, properly indented XML to your clipboard.

All processing happens entirely in your browser — your XML data never leaves your device. Free users can process files up to 500KB; Pro users have no size limit.

Frequently Asked Questions

Is my XML data stored on your servers?

No. All XML parsing and formatting happens entirely in your browser using JavaScript. Your data never leaves your device.

What's the maximum file size I can process?

Free users can process XML files up to 500KB. Pro subscribers have no file size limit and can process even multi-megabyte XML documents including large XRechnung invoices and ERP data exports.

Can I use this to validate XRechnung XML?

This tool validates XML syntax (well-formedness) but does not perform XRechnung-specific Schematron validation. For full XRechnung compliance checking including KOSIT business rules (BR-DE-1 through BR-DE-*), use our dedicated XRechnung Viewer tool.

Does the viewer support XML namespaces?

Yes. Our parser correctly handles XML namespaces, CDATA sections, and attributes. Namespace prefixes (like cbc:, cac: in XRechnung UBL) are displayed in the tree view alongside their resolved namespace URIs.

What is the difference between well-formed and valid XML?

Well-formed XML follows basic syntax rules: properly nested tags, a single root element, quoted attributes. Valid XML additionally conforms to a specific schema (DTD or XSD). Our viewer checks well-formedness. XRechnung validation adds schema and Schematron checks on top.

Can I view XRechnung UBL and CII files?

Yes. Both UBL (the default XRechnung XML syntax) and CII (used by ZUGFeRD) are standard XML files and can be viewed in our XML viewer. For detailed field-by-field interpretation of XRechnung data, use the XRechnung Viewer which maps XML paths to business term names (BT-1, BT-31, etc.).

What is CDATA in XML?

CDATA (Character Data) sections allow you to include text that contains characters that would otherwise need to be escaped — such as < and &. A CDATA section is wrapped in <![CDATA[...]]>. Our viewer renders CDATA sections correctly in the tree view.

How does XML relate to JSON?

Both XML and JSON are data interchange formats. XML is older, more verbose, and supports namespaces, schemas, and transformation pipelines (XSLT). JSON is simpler, more compact, and better suited for web APIs. XRechnung uses XML because of its namespace and schema validation capabilities. Our JSON Formatter handles JSON files.

Can I convert XML to JSON using this tool?

Our XML Viewer focuses on tree visualization and formatting. XML-to-JSON conversion is a separate task that requires decisions about how to represent XML attributes and text nodes in JSON. Many libraries (like fast-xml-parser in JavaScript or xmltodict in Python) handle this conversion with configurable mappings.

Related Tools