XlsConverter

XML to JSON for feeds, exports and record based files

Upload the XML file, choose the JSON shape, then convert. The repeating record element is detected automatically and each record becomes one JSON object.

XML

Encrypted, auto-deleted

Demo converts up to 100 rows, once.
Developer working at dual monitors with code editors at night

Product feeds, ERP exports and public data sets still arrive as XML, while modern code, APIs and front ends work in JSON. Generic converters translate XML structure literally and produce deeply nested objects full of @attributes and #text keys that nobody wants to read.

XlsConverter treats XML as a table: it finds the repeating record element and turns each record into one JSON object with flat keys. To see the same data as a spreadsheet, use XML to Excel or XML to CSV, and for spreadsheets going the other way see Excel to JSON.

How to convert XML to JSON in three steps

  1. 1Upload the .xml file.
  2. 2Choose the JSON shape and, if you like, minified output.
  3. 3Convert and download the JSON.

Mapping XML records and attributes to flat JSON

XML can describe any tree, but most files you would convert are really lists: an RSS channel with items, a catalog with products, an export with orders. Picking the repeating element as the row gives you one JSON object per record. Child elements and attributes of that record become keys, so an attribute like id and a child element like price end up side by side.

Attributes are kept apart from child elements: an attribute id becomes the key @id, so it never overwrites a child element with the same name. Values are written as JSON strings exactly as they appear in the file, which keeps leading zeros in codes such as 00123 and avoids rounding long numeric identifiers.

Deeply nested records with repeating child lists, such as an order with many line items, do not fit a single flat object. A child element that has its own children is kept as an embedded JSON value in that record, so nothing is lost and you can expand it in your code. For the opposite direction, building XML from a sheet, see XLS to XML.

XML to JSON questions

How do I convert an XML file to JSON?

Upload the XML, choose the JSON shape and download the result. The repeating record element is detected automatically.

What happens to XML attributes?

Attributes of the row element become keys in the JSON object, next to the child elements.

Are numbers written as JSON numbers?

No, values stay strings exactly as in the file, so codes with leading zeros and long identifiers are never altered. Cast them in your code where needed.

Can I get JSON Lines from XML?

Yes. Choose JSON Lines and each record is written as one object per line.

Can I test XML to JSON before paying?

Yes, the one-time demo converts up to 100 records. Full files need a plan, from 24 USD per month billed yearly.

Related converters

Convert full files and batches

Pro starts at $24 per month billed yearly. Cancel any time.

See plans