How to Convert XML to an HTML Table
Displaying XML data on a web page usually means transforming it first — and hand-writing table rows from XML is slow. This converter does it instantly. It parses your XML with a real parser, finds the repeated record elements under the root, and turns each into a table row. Child elements become columns, attributes become their own prefixed columns, and records with slightly different fields are unioned so the table stays aligned. Every value is HTML-escaped, you can add a CSS class to match your framework, and a live preview shows the rendered result. Copy or download. Everything runs in your browser, so nothing is uploaded.
Paste your XML
Paste your document or load the sample; it's parsed locally with nothing uploaded.
Style the table
Add a CSS class and toggle header, attributes and minify.
Copy or download
Grab the HTML with one tap or save it as an .html file.
XML vs HTML Tables — What's the Difference?
XML — Extensible Markup Language
A tag-based data format where records live in repeated named elements. It's great for storing and transporting structured data, but a browser won't render it as a table — the row structure is implied, not displayed.
HTML table markup
A set of table, thead, tbody, tr, th and td elements that browsers render as a real, styleable grid. Converting XML to HTML makes those implicit records into an explicit table people can see and style.
Common Use Cases
Show XML data on a page
Turn an XML export or feed into a table you can paste straight into a web page.
Feed & catalog display
Render product feeds or catalog XML as readable tables.
Reports & dashboards
Drop XML records into internal reports and static dashboards.
Docs & blogs
Embed data tables in articles and documentation from an XML source.
Framework-ready
Add a Bootstrap or Tailwind class so the table matches your design instantly.
Email tables
Produce simple semantic tables for HTML emails from XML data.
Legacy output
Convert XML from older systems into modern HTML tables.
Quick inspection
See what row data an XML file contains as a rendered grid.
Tips & Best Practices
Structure XML as repeated records
A root wrapping many same-named elements converts most cleanly — each becomes a row.
Use a framework class
Add your table class so the output matches your existing design with zero extra CSS.
Decide on attributes
Keep attributes for ids and metadata as columns, or turn them off for an element-only table.
Minify for production
Use minified output when embedding in a live page, and pretty output when you'll edit by hand.
Check the preview
The live preview shows exactly how the table renders before you copy the markup.
Troubleshooting
It says the XML is invalid
XML must be well-formed: tags balanced and closed, one root element, and special characters escaped. Fix any unclosed tags and try again.
Only one row appears
The root probably doesn't contain repeated same-named elements, so the whole document is treated as one record. Wrap your records in a common parent.
The table isn't styled
Raw HTML tables are unstyled by default. Add a CSS class matching your framework or wrap the output in your own styles.
Attributes are missing
Turn on 'Attributes'. They appear as columns with an @ prefix so they never clash with element names.
Frequently Asked Questions
How do I convert XML to an HTML table for free?
Paste your XML above and semantic HTML table markup appears instantly, with a live preview. Copy it or download an .html file — free, no signup.
How does it decide what a row is?
It looks for repeated same-named elements directly under the root and treats each as a row. If there's no repetition, the whole document becomes a single record.
What becomes a column?
Each record's child elements become columns, and — when enabled — attributes become their own columns with an @ prefix.
What if records have different fields?
Every field across all records becomes a column, and any record missing one gets an empty cell so the table stays aligned.
Does it create a proper thead?
Yes. With the header option on, the field names become th cells inside a thead and each record becomes a tbody row.
Can I add a CSS class?
Yes. Enter any class names — like 'table table-striped' — and they're added to the table element.
Is my data HTML-escaped?
Yes. Ampersands and angle brackets in your values are escaped so they display as text and can't break your page.
Can I get minified HTML?
Yes. Turn on minify for compact markup with no extra whitespace, ideal for production pages.
Is there a live preview?
Yes. The rendered table is shown right below the markup so you can see exactly what you'll get.
Is my data sent to a server?
No. Everything happens inside your browser, so your data never leaves your device.
Can I download the result?
Yes. Save the output as an .html file, or copy it straight to your clipboard.
How large a document can it handle?
It comfortably converts sizeable XML documents with many records, all in your browser.
Will it work with Bootstrap or Tailwind?
Yes. Add the relevant class names and the generated table slots straight into your framework's styles.
What about nested elements?
Deeply nested child elements are flattened to their text content in a cell; flatten the XML beforehand for separate columns.
Does it work on phones?
Yes, in any modern browser on Windows, Mac, Android or iPhone with nothing to install.
Is this converter really free?
Completely free, forever — no account, no ads and no premium wall.
100% free · No signup · Processed in your browser · Data never sent
Last updated: August 2026 · FlipMyFormat XML to HTML Converter
Written and maintained by the FlipMyFormat team · Runs entirely in your browser