XML to JSON

Convert parsed XML elements, attributes and text into JSON.

Local processing · Nothing is uploaded · 1 MB input limit

Input & settings

Paste text or drop a UTF-8 text file
Ready. Enter your input to begin.

How to use this tool

Paste your source, choose the supported options, then process. Inspect or download the complete result.

Limits and behavior

Attributes use @_ prefixes and mixed text uses #text. Repeated element names become arrays. This is a data mapping; comments and exact mixed-content ordering are not retained. Maximum total input 1 MB, output 3 MB, JSON nesting 64 levels. Processing stays in your browser worker. Input is limited to 1 MB and output to 3 MB. No input content is saved by CraftAI.

Convert XML content into JSON

Read a well-formed XML document and map its elements and attributes to JSON for inspection or data exchange.

Is there one universal XML-to-JSON conversion standard?

No. XML supports attributes and mixed content that can be represented differently in JSON. Review the mapping.

Related tools: json to xml · validate xml

Built on Hatchable