XML to JSON
Convert XML to JSON with attributes, repeated elements as arrays, and automatic number and boolean detection.
Convert XML to clean, readable YAML instantly. Free, private, and 100% in your browser.
Moving configuration from XML-based tools to YAML-based ones? This converter turns XML into idiomatic YAML in one step. It keeps attributes, turns repeated elements into lists, and quotes any value YAML might misinterpret.
Nested elements become indented YAML mappings, and repeated elements become lists.
Attributes are kept as @-prefixed keys, so no information from the XML is lost.
Optionally turn numeric and true/false values into YAML numbers and booleans.
Strings that YAML would misread, such as yes, no, or dates, are quoted automatically.
Malformed XML is reported with the exact line and column before conversion.
The conversion runs entirely in your browser. Your data is never uploaded.
<server env="production">
<host>api.example.com</host>
<port>443</port>
<tls>true</tls>
<allow>10.0.0.0/8</allow>
<allow>192.168.0.0/16</allow>
</server>server:
"@env": production
host: api.example.com
port: 443
tls: true
allow:
- 10.0.0.0/8
- 192.168.0.0/16
YAML is easier to read and edit than XML and is the standard for tools like Kubernetes, Docker Compose, Ansible, and CI pipelines. Converting XML configs to YAML is common when migrating to these tools.
Attributes become keys starting with @, for example "@env": production. They are quoted because @ has a special meaning at the start of a YAML value.
Elements with the same name inside one parent become a YAML list. A single element becomes a plain value.
No. The converter runs entirely in your browser using JavaScript. Your XML never leaves your device.
Convert XML to JSON with attributes, repeated elements as arrays, and automatic number and boolean detection.
Turn repeated XML records into a CSV table for Excel or Google Sheets, with automatic row detection.
Encode XML documents, SOAP messages, and SVG as Base64 or base64url.
Decode Base64 into well-formed, validated, and formatted XML.