XML to Markdown table converter

Good for showing XML data on GitHub, a wiki or a support ticket without writing the table by hand.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter xml text and repeating element name (optional).
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

The record element is chosen as in the XML to CSV converter: the most repeated element with attributes or children, or the name you type. Attributes become @name columns and children columns by name. The header line comes first, then the | --- | separator, then one line per record, with | escaped as \|.

Example

Result: Markdown table: | @id | @lang | title | author | price | | --- | --- | --- | --- | --- | | 1 | ar | مقدمة ابن خلدون | ابن خلدون | 45 | | 2 | en | Arabian Sands | Wilfred Thesiger | 60 |; Record element: book; Rows: 2.

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <book id="1" lang="ar">
    <title>مقدمة ابن خلدون</title>
    <author>ابن خلدون</author>
    <price>45</price>
  </book>
  <book id="2" lang="en">
    <title>Arabian Sands</title>
    <author>Wilfred Thesiger</author>
    <price>60</price>
  </book>
</catalog>
| @id | @lang | title | author | price |
| --- | --- | --- | --- | --- |
| 1 | ar | مقدمة ابن خلدون | ابن خلدون | 45 |
| 2 | en | Arabian Sands | Wilfred Thesiger | 60 |

Limits and caveats

  • Markdown has no nested tables, so deep elements are flattened into path columns such as d/e.
  • Line breaks inside a value are kept and can break the table, shorten them before publishing.

Questions about this tool

Where does the table render correctly?

On GitHub, GitLab and most Markdown editors that support GFM tables.

How do I choose what becomes a row?

Type its name in the repeating element box, otherwise the most repeated element with attributes or children is used.

Why do some cells show \|?

The | character separates columns in Markdown, so escaping keeps the cell whole and shows the symbol when rendered.