JSON to XML
Paste JSON, get XML. Configure attribute prefix (default @) and pretty-printing. Keys starting with the prefix become XML attributes; other keys become elements. Reverse direction at XML → JSON.
Paste JSON.
How to convert JSON to XML
- Paste in either panel.
- Configure under Options:
- Attribute prefix (default
@) — JSON keys starting with this become XML attributes. - Text content key (default
#text) — JSON key holding mixed-content text. - Array handling — Repeated element (default) or Single child.
- Pretty-print XML — on / off.
- Attribute prefix (default
- Output appears in the opposite panel. Copy or Download.
FAQ
Why is my array-of-one losing its shape?
XML has no native concept of "an array of one element". Repeated element mode reads round-trips as a single element, which the reverse direction may decode as an object instead of an array. The tool flags this when it happens.
What about namespaces?
Namespace prefixes are kept verbatim as element names — no real namespace resolution. For full XML namespace handling, use a dedicated XSLT pipeline.
Will it work offline?
Yes — uses fast-xml-parser, cached after first load.