XML to HTML Converter

Render an XML document as an HTML table, a nested list or a definition list, either as a fragment to paste or as a complete styled page.

XML
HTML
Runs locally in your browser

About the XML to HTML Converter

Sharing XML with someone who does not read XML usually means turning it into a web page first. Three layouts cover almost every case. Table of records finds the repeating element, makes one row per occurrence and one column per leaf value, which suits exports, feeds and query results. Nested list mirrors the document hierarchy with nested ul elements and shows attributes beside each tag name, which suits configuration files. Definition list emits a dl of full element paths and their values, which reads well in a report.

Every name and value is HTML escaped on the way out, so an ampersand or angle bracket inside your data cannot break the markup or inject anything into the page you paste it into. Attribute values become table columns prefixed with the attribute marker, so they are visible rather than silently dropped.

Leave the wrap option off to get a bare fragment for an existing template. Turn it on to get a complete document with a doctype, a viewport meta tag, a title taken from the root element and a small stylesheet with readable table borders, ready to open in a browser or email as an attachment. For the reverse trip, HTML Table to JSON reads a table back into data.

How to use

  1. Paste XML on the left or upload a file.
  2. Choose the layout that fits your document: table, nested list or definition list.
  3. Tick Wrap in a full HTML page if you want a file you can open directly.
  4. Copy the markup or download it as converted.html.

Common questions

Why does the table layout report that no records were found?
Your document has no repeating element to make rows from. Switch to Nested list or Definition list, which work with any structure.
Is the generated HTML safe to embed?
Yes. Text and attribute values are escaped, so content from your XML is rendered as text and never as markup.
Can I restyle the full page output?
Yes. The stylesheet is a short inline block at the top of the file; replace or extend it after downloading.
Are namespaced element names kept?
Yes. A name such as dc:title appears intact in the heading or list item.