araç köşesi

XML to HTML Table

Turn repeating XML records into <table> markup you can paste into a web page

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

You have a list in XML and want to show it as a table on a web page, in a blog post or in an email. Paste the XML into the left pane; the right pane fills with tidy markup made of <table>, <thead>, <tbody>, <tr>, <th> and <td>. The repeating tag becomes the row: a file with 40 <book> tags gives 40 rows, and each book's <title>, <author> and <year> become column headers. A value written inside the tag, like <book no="1">, goes to an @no column; nested data goes to a column like publisher.city; a field one book lacks stays an empty cell. Characters that mean something in HTML are escaped, so a name like "Smith & Sons <Ltd>" shows up correctly instead of breaking your layout, while letters such as é or ü stay readable. The markup carries no CSS, so it picks up your site's own table style. One clear limit: this tool does not run XSLT. If the XML points to a stylesheet, that is ignored and the data is laid out as a plain table.

This tool is also known as xml to html, xml to html table, xml to html converter, convert xml to html table, display xml as table.

What is HTML table?

An HTML table is a set of tags that draws rows and columns on a web page: <table> wraps it, <thead> holds the header, <tbody> the body, <tr> is a row, <th> a header cell and <td> a data cell. The browser draws the grid from these tags alone; borders, colors and spacing come from CSS. That is why unstyled table markup fits any site: it takes its look from the page it lands on.

What is XSLT?

XSLT is a transformation language that describes how an XML document turns into another document, most often an HTML page. It is what makes an e-invoice file show up in a browser with a logo, lines and totals. An XSLT is written for one kind of document and does not come with every XML. This tool does not run XSLT; it uses one general rule to turn repeating records into a table.

What is the difference between XML and HTML?

Both use angle-bracket tags, but they do different jobs. XML carries data, and whoever owns the data picks the tag names: <book>, <author>, <price>. HTML describes what a page shows, and its tags are fixed: <table>, <p>, <h2>; browsers only understand those. Open an XML file in a browser and you see a tree, not a table. This tool bridges the two by placing XML records into the table tags HTML understands.

Not XSLT: this tool lays the data out as a table

"XML to HTML" can mean two things. One is XSLT: a transformation file that ships with the XML and describes exactly how the page should look; invoice viewers and many legacy systems work this way. The other is simply putting the records into a table. This tool does the second; an <?xml-stylesheet?> line or an embedded XSLT is ignored.

If you need a document's official look (an e-invoice rendered with its logo and layout), you need its XSLT and a viewer that runs it. If you want to list repeating records such as products, books, staff or orders on a page, this tool does exactly that: records become rows and fields become columns.

Where to paste the table markup

In WordPress, add a Custom HTML block and paste the markup into it; in Blogger, switch the post to HTML view. The table arrives unstyled and your theme adds borders and padding. On your own page you can add a class to the <table> tag and style it with CSS.

The downloaded .html file opens in any browser with a double-click; from there you can select the table and paste it into Word or an email with the grid intact. For very long lists (thousands of rows), a web table gets unwieldy; converting XML to CSV and opening it in a spreadsheet is the better route.

Frequently asked questions

How do I turn an XML file into an HTML table?

Open the XML file in Notepad or TextEdit, copy everything and paste it into the left pane here. The repeating tag becomes the row and the tags inside it become columns, and <table> markup appears on the right. Copy it into your page or download it as an .html file.

Does it apply the XML's XSLT stylesheet?

No. This tool does not run XSLT. A linked or embedded stylesheet is ignored and the data is laid out as a plain table. For a document's official rendering, such as an e-invoice, use the viewer that comes with it.

Can I choose which tag becomes a row?

Yes. By default the most repeated tag is used, and the result line says which one. To use a different tag, type its name into the "Tag that makes a row" box; no angle brackets or namespace prefix are needed.

Is my XML sent anywhere?

No. The table markup is built entirely inside your browser, and the data you paste never leaves this page or gets stored. Once the page has loaded, it works even without a connection.