About this tool
Plenty of enterprise stacks — SOAP, financial reconciliation, government data exchange — still rely on XML. When new services are written in JSON, connecting to those systems requires a JSON → XML bridge.
Built on fast-xml-parser, our converter offers a configurable attribute prefix (default `@_`), optional pretty printing and custom indentation — enough to cover most integration scenarios.
How to use
- Paste JSON into the input.
- Set an attribute prefix: JSON keys starting with this prefix become XML attributes.
- Choose indent width and whether to pretty-print.
- Click "Convert".
Use cases
- Integrate with legacy SOAP endpoints that require XML payloads.
- Wrap modern JSON responses as XML for downstream consumers that cannot parse JSON.
- Generate skeletons of RSS, Atom and sitemap XML documents.
Notes
- Non-prefixed keys become XML child elements.
- The root element is derived from the top-level JSON key; arrays at the top are wrapped in a container element.
- Special characters (`<`, `>`, `&`) are escaped according to XML rules.
Frequently Asked Questions
Is an XML declaration emitted?
Yes, `<?xml version="1.0" encoding="UTF-8"?>` is prepended automatically.
How do I make a field an attribute?
Prefix its key with the configured attribute prefix (default `@_`). For example `{"@_id": 1}` becomes `id="1"`.
How are arrays rendered?
Array elements are repeated as siblings with the same tag name.