Loading tool…
Setting up your workspace on this device.
Parse XML into JSON and build it back.
Loading tool…
Setting up your workspace on this device.
Advertisement
XML ↔ JSON parses XML into JSON and builds XML back from JSON. The XML is validated first, so malformed markup shows an error with its line number. In the JSON, attributes appear with an @_ prefix, element text that sits next to attributes goes into #text, and repeated sibling elements become arrays. Numbers and true/false values are converted to JSON types. Choose 2- or 4-space indentation, copy the result, or press Reverse using output to switch direction. Everything is processed in your browser, and nothing is uploaded.
Open XML ↔ JSON
Launch XML ↔ JSON directly in your browser — there is nothing to download, install, or configure first.
Add your input
Paste your text or load your file into XML ↔ JSON to begin — no preparation or cleanup needed.
Choose a format and convert
Pick the target format or options and run XML ↔ JSON. The conversion happens instantly on your device.
Attributes become keys with an @_ prefix, such as "@_id". When an element has both attributes and text, the text is stored under "#text".
Repeated sibling elements with the same name become an array, while an element that appears once stays a single value. Check for this if your code always expects a list.
Tag and attribute values that look like numbers are converted to JSON numbers, so 007 becomes 7. Values containing letters or other characters stay as strings.
A JSON object, ideally with a single top-level key that becomes the root element. A top-level array is rejected, because an XML document needs a root.
Yes. XML ↔ JSON is completely free, with no account, no paywall, and no usage limits.
No. XML ↔ JSON works instantly in any modern web browser — there is no software to install, no extension, and no sign-up.