One XML converter, six output formats
When you receive an XML file and are not yet sure where the data will end up, this XML converter lets you try several targets without re-pasting anything. Every button uses the same parse of your document, so attributes, repeated elements and number detection behave identically across formats. That consistency makes it easy to compare outputs and pick the one that suits the next step.
Choosing a target format
| Button | You get | Choose it when |
|---|---|---|
| To JSON | The full document as JSON with @ attributes | A script, API or database will consume the data |
| To YAML | The full document in block-style YAML | The data becomes configuration people edit |
| To CSV | The repeated records as rows | You need a spreadsheet or bulk import |
| To TSV | The same rows, tab-separated | You want to paste straight into spreadsheet cells |
| To HTML | A table (nested tables for nested data) | People should read it on a page or in an email |
| To Text | Indented key: value lines | You need a quick human-readable summary |
Example
<catalog>
<book id="bk101"><title>XML Developer's Guide</title><price>44.95</price></book>
<book id="bk102"><title>Midnight Rain</title><price>5.95</price></book>
</catalog>
To JSON keeps everything, including the wrapper:
{
"catalog": {
"book": [
{ "@id": "bk101", "title": "XML Developer's Guide", "price": 44.95 },
{ "@id": "bk102", "title": "Midnight Rain", "price": 5.95 }
]
}
}
(Condensed; the real output is fully indented.) To CSV keeps only the rows:
@id,title,price
bk101,XML Developer's Guide,44.95
bk102,Midnight Rain,5.95
Shared options
- Attribute prefix – marks attributes in JSON and YAML keys and in CSV/TSV/HTML column headers. Clear it for plain names.
- Detect numbers & booleans – makes
44.95a number andtruea boolean in JSON and YAML. Leading-zero values always stay strings. - Indent – spacing for JSON output (2, 3, 4 spaces or a tab).
Rules that apply to every format
- Repeated sibling elements become lists; an element that appears once is a single value. Watch for this when some records have one child and others several.
- Element text next to attributes is stored under
#text. - Comments, the XML declaration and processing instructions are ignored.
- Malformed XML produces an error with line and column for every target, so fix the source once and all outputs work.
A typical workflow
Start with To JSON to see the complete structure the parser produced: which elements became arrays, where #text keys appear and which values were typed as numbers. Then switch to the format your destination needs. If a table looks odd, for example with both sku and sku.0 columns, the JSON view usually explains why: some records contain an element once and others several times. Adjust the source XML or clean up the columns afterwards.
When to use a dedicated page
This hub keeps the most common settings. For more control, go to the single-purpose pages: XML to JSON adds sorted keys, XML to CSV offers delimiters and quoting, and XML to Excel produces a downloadable .xlsx workbook.
Privacy
All conversions run locally in your browser. Load URL fetches through our server, and Save & Share stores the input to create a link; nothing else is sent.