Convert real-world XML into clean JSON without hiding the hard parts. Preserve attributes and namespaces, detect repeated arrays, keep huge numbers exact, inspect mixed content, or switch to a lossless XML infoset model. It can also reverse Tool #337’s lossless typed XML exactly.
Checks that prevent silent corruption and unsafe XML shortcuts.
Structural details worth reviewing before using the JSON in an API, database or codebase.
No files queued.
Compact mode deliberately exposes the conventions that basic converters usually hard-code.
A bounded preview of XML element/attribute paths and how the current profile treats them.
| XML path | JSON destination / rule | Kind |
|---|---|---|
| Convert data to populate the preview. | ||
Repeated sibling tags become arrays, attributes stay explicit, and namespace handling is configurable. Best for API and app consumption.
Preserves element order, qualified names, namespace URIs, attributes, text, CDATA, comments and processing instructions in an explicit node model.
Recognizes the urn:onefreeplace:json:1 typed vocabulary and reconstructs original JSON types and long numeric tokens exactly.
XML has attributes, namespaces, comments, processing instructions and mixed text/element order. JSON has objects, arrays and scalar types. There is no universal one-to-one conversion, so this tool makes the mapping rules visible and offers a lossless model when compact JSON would discard information.
@name keys or a $attributes object.<order>
<id>900719925474099312345</id>
<paid>true</paid>
</order>
Smart typing →
{"order":{"id":900719925474099312345,"paid":true}}When smart typing is enabled, numeric text is serialized from the original lexical token instead of first passing through JavaScript floating-point numbers. Leading-zero values such as 00123 remain strings.
Repeated sibling elements with the same mapped name become arrays automatically. “Always arrays” makes even single child elements arrays, which can be useful for stable schemas where a tag may repeat later.
Keep prefixes is familiar and readable. Clark names such as {urn:example}item are prefix-independent and collision-safe. Local names only can be convenient, but the tool refuses collisions instead of silently merging elements from different namespace URIs.
Compact JSON stores direct element text under the configured text key, but it cannot perfectly retain interleaving such as text → child → text → child. The audit flags mixed content. Use the lossless infoset profile when order matters.
The parser intentionally rejects DOCTYPE and ENTITY declarations. That avoids custom entity expansion and external-entity behavior rather than trying to be a validating DTD processor. Standard XML entities and numeric character references are decoded normally.
This is a converter, not an XSD-aware ETL designer. It does not validate against an XSD, execute XSLT/XPath transforms, or fetch external schemas/entities. For schema-to-schema enterprise mappings and automation, specialist mapping software remains appropriate.