XML to JSON

Turn XML into readable JSON. Paste text or open a file.

Paste XML or open a file. Convert when you’re ready.

UTF-8 XML · Up to 1 MB · 0.0 KB

Edits clear the previous result, so downloads always match your input.

How XML maps to JSON
  • The root element is kept. Repeated sibling names become arrays.
  • Attributes use @attributes; text with attributes uses #text.
  • Mixed text and elements use an ordered #content array. CDATA becomes text; comments and processing instructions are omitted.
  • Names and namespace prefixes are kept. Numbers, booleans and dates stay strings to preserve values such as leading zeros. Empty elements become empty strings.
  • Uncheck “Trim text whitespace” to preserve spacing. XML has no single standard JSON mapping; this is a data conversion, not a reversible XML archive.
  • DTDs and custom entities are unsupported. Limits: 64 element levels, 30,000 nodes and attributes, 8 MB JSON output.

Processed on your device. Your content is never uploaded or saved by this tool.

About XML to JSON

From XML to readable JSON. No uploads needed.

Supported input
XML text or a supported XML file.
What you get
Formatted JSON with the converter’s selected mapping options.
Limits and accuracy
XML attributes, repeated elements and mixed text need explicit mapping. Review the JSON before using it; conversion does not run XML scripts or fetch external entities.
Where processing happens
Processing stays in your browser. This tool does not send the content to a server.

How to use XML to JSON

  1. Paste or upload XML.
  2. Choose the mapping and formatting options, then convert.
  3. Review the JSON, copy it or download it.