JSON WalletPrivacy-first JSON & API workspace

XML to JSON

Paste XML — a document, a SOAP response, an RSS feed, a config file — and get equivalent JSON. Elements become keys, repeated tags become arrays, and attributes are preserved with an @ prefix. Runs entirely in your browser.

XML
JSON

Convert XML to JSON in the browser

Plenty of systems still speak XML — SOAP web services, RSS and Atom feeds, sitemaps, Office documents, Android layouts and older enterprise APIs. Modern JavaScript, on the other hand, lives in JSON. This converter reads an XML document and produces a JSON object with the same structure, so you can pull a legacy response into a JSON-based pipeline, inspect a feed in a tree view, or write assertions against it in a test.

How the conversion works

Parsing uses the browser's native XML parser, so it handles namespaces, CDATA and entities correctly and reports a clear error on malformed input. Each element becomes a key; nested elements become nested objects. When a tag repeats inside its parent it becomes an array, which is the behaviour you want for lists of items, records or feed entries. Attributes are not thrown away — they are kept under@name keys, and any text alongside child elements or attributes is preserved under#text. Leaf values are type-inferred so numbers and booleans come through as real JSON types rather than strings.

When you would use it

Migrating off a SOAP or XML API, normalising an RSS feed into JSON for a frontend, converting an exported XML config into something a JSON tool can read, or just making a dense XML payload readable. The resulting JSON drops straight into the rest of the workspace: format and validate it, explore it in the tree and table views, query it with JSONPath or jq, or diff two documents. Switch the direction dropdown to turn JSON back into XML when a downstream system still requires it.

Privacy

The converter runs client-side and needs no network once loaded. XML responses often carry identifiers, internal endpoints and business data, so keeping the whole conversion on your device matters — nothing is uploaded, logged or stored.

Frequently asked questions

How are repeated elements handled?

When a parent contains two or more child elements with the same tag name, they collapse into a JSON array. A single occurrence stays a plain value, which matches how most XML-to-JSON mappings behave.

What happens to attributes?

Attributes are preserved as keys prefixed with @. An element with both attributes and text content keeps the text under a #text key so nothing is lost.

Are values typed?

Text content is inferred: numeric strings become numbers, true/false become booleans, and empty elements become null. Mixed or ambiguous content stays a string.

Is my XML uploaded?

No. Parsing uses your browser's built-in XML parser and runs entirely on your device — nothing is sent to a server.

Press K for commands