XML to JSON
Pick file or take photo
More tools
- JSON to XMLConvert a JSON file to readable XML with consistent indentation.
- JSON to CSVTurn a JSON file into a CSV that opens in Excel and Google Sheets.
- CSV to JSONTurn a CSV file into JSON, using the first row as the keys.
- CSV to ExcelConvert a CSV file into an Excel XLSX spreadsheet you can edit.
- Excel to CSVTurn the first sheet of an Excel .xlsx file into a CSV file.
- Font converterConvert fonts between TTF, OTF and WOFF for use on the web.
- Open winmail.datGet the real attachments out of a winmail.dat file.
- WhatsApp chat to ExcelConvert a WhatsApp chat export to a spreadsheet with dates and senders.
- PDF to WordConvert PDF to Word online and save the converted file.
- PDF to ExcelConvert PDF to Excel online and save the converted file.
- PDF to PowerPointConvert the pages of a PDF into slides for a PowerPoint file.
- PDF to TIFFSave every page of a PDF in one multi-page TIFF file.
How to check an XML record in JSON
Use a small sample when an XML feed will become input to a JavaScript app. Pick a record that has an attribute, a repeated element, and a value your app will look up.
After conversion, inspect those fields before wiring the result into code. A field that appears once and a field that repeats may have different shapes in JSON, so test both examples.
FAQ
Which records are useful test cases when a parser expects a list?
Test one record with a single occurrence and another with repeats of the same XML element. Handle the resulting shapes your consumer actually receives.
How do I convert XML to JSON?
Choose the XML file and press Convert to JSON. You get a JSON file with the same structure.
How are attributes shown?
Each attribute becomes a key that starts with @, such as @id.
What happens when an element repeats?
The repeats become a JSON list under one key.
Where does an element's text go when it also has attributes?
Under a key named #text, beside the @ keys.
It says the XML could not be read. Why?
A tag is closed out of order or left open. Fix the file so every opening tag has a matching closing tag.
Is my file uploaded?
No. The file is converted inside your browser and never sent to a server. It is free.