JSON & XML / BROWSER UTILITY
XML ↔ JSON Converter
Convert XML and JSON using explicit attributes, text and repeated-element mappings.
Processed locally in your browser. Your data is not uploaded.
Names become properties; repeated siblings become arrays. Attributes use @attributes; attributed leaf text uses #text; empty leaves are empty strings. Namespace declarations and qualified names are retained. Mixed text/children are rejected. Comments, processing instructions, interleaved ordering and CDATA boundaries are not preserved. JSON arrays repeat the named child. A single matching root property is unwrapped; other objects are wrapped. Names use the ASCII XML-name subset; prefixes must be declared.
Processed in your browser. Input limit: 100,000 characters (XPath: 50,000); output limit: 1,000,000 characters; query and regex limit: 2,000 matches. Larger inputs should be split into smaller files.
Some XML structures cannot be represented in JSON and converted back losslessly.
Good to know
Names become properties; repeated siblings become arrays. Attributes use @attributes; attributed leaf text uses #text; empty leaves are empty strings. Namespace declarations and qualified names are retained. Mixed text/children are rejected. Comments, processing instructions, interleaved ordering and CDATA boundaries are not preserved. JSON arrays repeat the named child. A single matching root property is unwrapped; other objects are wrapped. Names use the ASCII XML-name subset; prefixes must be declared.
Example: Use Try an example for fictional Record and Code values.