XML ↔ JSON Converter

Convert XML to JSON or JSON back to XML. Handles attributes, text nodes, and arrays sensibly.

Enter input above to see the result.

What is this for?

XML and JSON are the two dominant data interchange formats, and you regularly need to translate between them—migrating from a SOAP API to REST, plumbing legacy feeds into a modern stack, or simply reading XML in a tool that only speaks JSON. The mapping is opinionated rather than reversible-by-default, because XML has features (attributes, mixed content, ordered children) that JSON fundamentally lacks. This tool uses the conventional fast-xml-parser-style mapping: attributes get a configurable prefix (default @), text nodes go to a key (default #text), and repeated child elements collapse to arrays. Both directions run entirely in your browser with no server round-trip.

When to use it

How it works

Common gotchas

Tips for smooth conversions