CSV to JSON Converter
CSV to JSON Converter online: fast, private and free for everyday document work.
Convert XML into readable, indented JSON in your browser, using the browser's own XML parser. Attributes are dropped and repeated tags become arrays.
Your browser is preparing the tool. It runs 100% locally.
Paste XML and get indented JSON. The tool parses your XML with the browser's own engine and turns each element into a JSON property, using the tag name as the key. Text content becomes a string, a repeated tag becomes an array, and a tag that appears once stays an object. Attributes are not included. Everything runs in your browser.
This reads an XML document and produces the equivalent JSON, pretty-printed with two-space indentation. Each element becomes a key named after its tag, and the nesting follows the XML structure.
Two things are worth knowing up front. XML attributes are dropped — only element text and child elements are kept — and a tag that repeats becomes a JSON array while a tag that appears once stays a plain value, so the shape depends on how many siblings are present.
Paste or type your XML. It is parsed by the browser's built-in DOMParser — a real XML parser, not a regular expression.
The tool walks the element tree from the root. An element with no child elements becomes its text content as a string; an element with children becomes an object keyed by the child tag names.
When the same tag appears more than once under a parent, those values are collected into an array. The result is printed as indented JSON you can copy or download.
Leaf element (text only) = a string value
Element with child elements = an object keyed by child tag
Same tag repeated under one parent = an array
Attributes = not includedThe XML <row><name>Alice</name><age>30</age></row> inside a <rows> element becomes {"row": {"name": "Alice", "age": "30"}} — and age is text, not a number.Because a single row is an object but two rows would become an array, the JSON shape depends on how many matching tags exist.
Your XML is parsed and converted entirely in your browser — there is no server and nothing is uploaded.
The data never leaves your device, so even sensitive records stay private.
No account, no stored copy; the conversion is gone when you close the tab.
| Input | XML |
|---|---|
| Output | Indented JSON (.json) |
| Parser | Browser DOMParser |
| Attributes | Dropped |
| Leaf values | Always strings |
| Repeated tags | Become arrays |
| Processing | 100% in-browser |
Attributes are dropped. The walk only reads element nodes and their text, so a tag like row with an id attribute loses that id. If your data lives in attributes, this tool is not the right fit.
Leaf values are always strings. A number in the XML, such as a year of 2024, comes out as text rather than a JSON number — there is no type inference.
A tag that appears once becomes an object or string; the same tag repeated becomes an array. This single-versus-array ambiguity is inherent to XML, so the JSON shape can change with the number of records.
Mixed content — an element holding both text and child elements — keeps only the child object and drops the loose text.
Parsing uses the browser's DOMParser, which does not throw on broken XML; instead it returns a document containing a parser-error element, so malformed input can produce odd JSON rather than a clear error. Check that your XML is well-formed first.
Turn an XML API response into JSON your JavaScript can use directly.
Convert an RSS or config XML into readable JSON to see its structure.
Move data from an XML source toward a JSON-based pipeline.
Flatten XML into JSON to diff it against another JSON document.
If your XML relies on attributes, namespaces or mixed content, use a configurable XML-to-JSON library. To turn JSON back into XML, use the JSON to XML converter.
Parses your XML with the browser's built-in DOMParser and walks the element tree into JSON: text becomes string values, a repeated tag becomes an array, and a single tag stays an object. Attributes are not included. Runs entirely in your browser.
CSV to JSON Converter online: fast, private and free for everyday document work.
Convert with JSON to CSV Converter, preserving structure and data, with zero uploads.
Markdown to HTML in seconds — accurate, free and processed locally in your browser.
Convert with CSV to Excel Converter, preserving structure and data, with zero uploads.
Excel to CSV Converter online: fast, private and free for everyday document work.
Convert with Excel to JSON Converter, preserving structure and data, with zero uploads.
It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.