Skip to main content
Payload Studio

XML to JSON Converter

Convert XML to JSON locally without sending data to any server.

Your data stays in your browser.

Tool guide

About the XML to JSON converter

Turn an XML element tree into JSON with visible rules for attributes, text and repeated elements.

Conversion rules

  • Attributes use keys prefixed with @.
  • Element text uses #text when the element also has attributes.
  • Repeated sibling elements with the same name become arrays.
  • Elements without attributes or children become text values.

How to use it

  1. Paste a valid XML document.
  2. Select Convert.
  3. Review the generated keys and arrays before copying or downloading the JSON.

Mixed content

Elements that interleave text and child elements, such as text around a nested strong element, are rejected. This prevents a conversion that would silently lose the original text order.

Privacy

XML parsing and JSON generation run locally in your browser. The document is not uploaded.