Flatten an XML
Extract all keys and values of an XML document as a flat key=value list with dot paths, array indices and attribute keys.
Input
Output
About Flatten an XML
Flatten an XML walks the whole document and produces a flat list of key=value pairs. Nested elements become dot-separated paths, repeated elements get index suffixes, and attributes are prefixed.
Features
How to Use
Examples
The sample flattens to catalog.product[0].name=Wireless Mouse, etc.
Benefits
Frequently Asked Questions
Is my XML sent to a server?
No. Everything runs locally in your browser. Your data is never uploaded, stored or logged.
Can I download the result?
Yes — use the Download button below the output area, or Print / Save PDF for a printable copy.
More XML Tools
View AllExtract Plain Text from XML
Free tool to extract plain text from XML: strip tags, attributes, comm...
Convert XML to TSV
Free XML to TSV converter that flattens repeated XML elements into a t...
Convert XML to Base64
Free XML to Base64 converter that UTF-8 encodes your document and prod...
Convert PDF to XML
Extract text from a PDF file and output it as structured XML. Paste PD...
Truncate XML
Loop over an XML document and truncate long element names, attribute v...