Convert XML to Markdown Lists & Tables
.xml document into readable Markdown with fast-xml-parser: the element hierarchy becomes an indented bullet list, repeated sibling records become a GFM table, and attributes are kept inline. The whole tree is parsed in your browser — nothing is uploaded.Processing happens 100% in your browser — nothing is uploaded.
No schema means no semantic mapping
49.00 renders as 49 and zero-padded codes can lose their padding. Attribute values are left exactly as written.How to convert XML to Markdown
- Input: drop your .xml file onto the dropzone, or paste the document straight into the editor.
- Process: fast-xml-parser builds the tree locally, then each node is rendered as a nested bullet or, for flat repeated siblings, as a GFM table.
- Copy: send the Markdown to your clipboard or save it as a .md file.
Why Convert XML to Markdown with MD Convert?
Repeated records become GFM tables
When a run of sibling elements shares a name and every child is a scalar value, the group is emitted as a pipe table with one row per sibling and the union of fields as columns. Missing optional fields become empty cells rather than shifting values into the wrong column.
Hierarchy becomes indented bullet lists
Anything genuinely nested stays nested: each element becomes a bullet with its children indented beneath it, to arbitrary depth. Elements carrying only character data collapse onto a single labelled line instead of spawning a redundant child node.
Attributes are preserved, not discarded
In XML the identifier is more often an attribute than a child element, so attributes are rendered inline in parentheses after the element name — and as their own at-prefixed columns in table output, where they cannot collide with a same-named child element.
Schema-agnostic and 100% local
No tag name is given special meaning, so custom schemas convert as predictably as standard ones. fast-xml-parser runs inside your browser, which is what makes it safe for service payloads, signed messages, and configs holding endpoints.
XML to Markdown: Before and After
One document, both renderings. The scalar element becomes a labelled line, and the repeated sibling elements are detected as a record set and emitted as a pipe table — with the attributes as their own columns.
<inventory>
<updated>2026-08-31</updated>
<item sku="A-100" stock="12">
<name>Wireless keyboard</name>
<price>49.00</price>
</item>
<item sku="A-101" stock="0">
<name>Mechanical keyboard</name>
<price>119.00</price>
</item>
</inventory>- **inventory**
- **updated**: 2026-08-31
- **item** — 2 entries
| name | price | @sku | @stock |
| --- | --- | --- | --- |
| Wireless keyboard | 49 | A-100 | 12 |
| Mechanical keyboard | 119 | A-101 | 0 |Understanding the XML Format: W3C XML 1.0 (Fifth Edition)
- Format
- Extensible Markup Language
- Specification
- W3C XML 1.0 (Fifth Edition)
- Media type
application/xml- Parser used
- fast-xml-parser
Technical Specifications & XML Tree Mapping Rules
- Repeated Sibling Table Detection: Sibling runs sharing the same tag name whose child nodes are entirely scalar map automatically to GFM pipe tables; columns represent the superset union across all siblings.
- Hierarchical Tree Fallback: Nested elements, mixed subtrees, and deep nodes fall back to indented bullet lists to guarantee lossless hierarchical structural representation without data truncation.
- Attribute Scoping & Prefixes: In table rendering, XML attributes emit as dedicated `@attribute` columns to avoid collisions with child elements; in list rendering, attributes append inline in parentheses.
- Entity & CDATA Resolution: Predefined XML entities (`&`, `<`, `>`) resolve to literal characters; CDATA blocks unwrap as clean text; external DTD entity expansion is declined for security.
- Lexical Value Coercion: Numeric-looking values parse as numbers (trailing precision like `49.00` emits as `49`); attribute values remain verbatim strings; malformed XML fails with exact parser line offsets.
Developer Alternative: CLI (xq) & Python (xmltodict) Extraction
For batch pipelines or server-side automation, xq and xmltodict with pandas produce the same kind of Markdown outside the browser.
# Extract repeated XML elements directly into a tab-delimited or pipe table using xq
xq -r '.inventory.item[] | [.name, .price, ."@sku", ."@stock"] | @tsv' input.xml# Programmatic XML to Markdown table conversion using Python xmltodict + Pandas
# requires: pip install xmltodict pandas tabulate
import xmltodict
import pandas as pd
with open("data.xml", "r", encoding="utf-8") as f:
doc = xmltodict.parse(f.read())
# Normalize target XML node array into a GFM pipe table
items = doc["inventory"]["item"]
df = pd.DataFrame(items)
markdown_table = df.to_markdown(index=False)
print(markdown_table)XML to Markdown: Comparing the Practical Approaches
| Method | Privacy | Record sets as tables | Schema awareness | Setup | Batch / automation | Cost |
|---|---|---|---|---|---|---|
| This tool (fast-xml-parser) | Highest — parsed in the tab, never uploaded | Yes, for uniformly flat siblings | None by design — predictable across schemas | None — paste or drop a file | One document at a time | Free |
| XSLT stylesheet | High — runs locally | Exactly as you specify | Total — you encode your schema | Write and maintain a stylesheet | Strong — scriptable | Free, plus your time |
| Pandoc CLI | High — runs locally | No; XML is not a general Pandoc input | Only for formats it knows (DocBook, JATS) | Local install | Strong | Free |
| A custom script (Python or Node parser) | High — your infrastructure | Whatever you implement | Whatever you implement | Code plus dependencies | Strong | Free, plus your time |
| Pasting the document into a chat model | Low — the payload becomes a prompt | Usually, but values may be silently altered | Inferred, and confidently wrong at times | None | Poor | Per-token |
How You Can Verify the Privacy Claim
Zero server upload
Conversion runs inside your browser tab. Open DevTools, switch to the Network panel, and convert a file: for every format except URL to Markdown you will see no request carrying your document — because there is no endpoint to send it to.
Parses on the main thread
Parsing stays inside your browser tab — this format’s parser needs DOM APIs. Nothing is uploaded. Everything is plain JavaScript — no native plugin, no WebAssembly toolchain, nothing to install.
Nothing to sign up for
No login, no quota, no paywall, and no tracking tied to your files. Analytics are cookieless and aggregate only. Read the privacy policy for the full data-flow breakdown, including the one proxied exception.
The parsers doing the work
No proprietary black box: each format is handled by a widely audited open-source library, running client-side at the version pinned in our lockfile.
XML to Markdown — FAQ
When do repeated elements become a table instead of a list?
When at least two siblings share a name and every one of their children is a scalar value. A single nested child anywhere in the group disqualifies it and the whole group stays as bullets — a verbose list is better than a table that silently drops a field. Tables are also only emitted near the top of the document, because indented pipe tables are not portable GFM.
How are XML attributes represented in the Markdown?
Inline, in parentheses after the element name, so a bullet stays readable while remaining lossless. In table output each attribute becomes its own column prefixed with an at sign, which keeps it distinct from a child element of the same name.
Are CDATA blocks and XML entities resolved?
Predefined entities (&, <, >) resolve to literal characters and CDATA sections unwrap as clean text. External or custom entities declared in a DTD are not expanded — declining that expansion is a security boundary against entity injection. Namespace prefixes are preserved verbatim rather than expanded to URIs.
What happens if the XML is malformed?
The parse fails and the parser's own error is surfaced with a line and column offset, rather than a heuristic repair being attempted. Unclosed tags, mismatched closing tags, and unescaped ampersands are the usual causes; fix the source at the reported offset and retry.