DevKitBase
ToolsAboutPrivacy

XML to JSON without posting the document to a converter API

Paste XML; get a JSON view. Attributes and text nodes follow a stated convention (e.g. `@attr`, `#text`).

chars: 39
Input
Output

When to use

Inspecting SOAP-ish samples or migrating a small XML config into JSON tooling.

Examples

Input
<user><id>1</id><name>Ada</name></user>
Output
{
  "user": {
    "id": "1",
    "name": "Ada"
  }
}

How it works

DOMParser → walk nodes → JSON. Invalid XML surfaces parser errors.

Common pitfalls

  • Attribute naming conventions differ by implementation (#attr vs @attr).
  • Mixed content (text + children) is awkward in JSON.
  • Namespaces can look noisy when flattened.

How this differs

Inverse of JSON→XML. Formatter won’t parse XML.

FAQ

Namespaces?
Basic support; complex NS-heavy docs may need dedicated tools.
Huge XML?
Browser limits apply.
Same mapping as JSON to XML on this site?
Aim for round-trip on simple trees; say when not.
Reverse?
JSON to XML.

Related tools

Runs in your browser. Nothing is uploaded. Not a security product —hashes and JWT decode are for debugging, not password storage or auth advice.