jsontoolskit.org
JSON and JSON Schema utilities, in the browser
Say hi →

JSON to XML

JSON → XML · attribute prefix · pretty-print

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

  1. Paste in either panel.
  2. 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 handlingRepeated element (default) or Single child.
    • Pretty-print XML — on / off.
  3. 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.