XML formatting and JSON conversion
This tool beautifies XML payloads and feeds so you can inspect deeply nested nodes and verify element names. You can output the cleaned XML, or convert the structure into JSON to make it easier to consume in modern web applications.
Converting legacy XML APIs into JSON helps you understand complex schemas before mapping the data into JavaScript-heavy environments.
Formatting options
Control the visual nesting of the output by selecting 2 spaces, 4 spaces, or tabs.
Enable minification to strip all visual whitespace and generate a compact, one-line output. This is useful for preparing XML for transport, embedding feeds, or storing simple structured data compactly.
How conversion handles attributes
When converting XML to JSON, the tool preserves attributes by prefixing their keys (e.g., @_id). This ensures they are not confused with child elements.
Repeated sibling tags are grouped into arrays, so the resulting JSON structure remains predictable and accurate to the original XML document. Text content and CDATA are also preserved alongside attributes when present.