Skip to contentSellstamp

XML to JSON

Convert XML to JSON in your browser: attributes become @keys, text becomes #text and repeated elements become arrays.

Stays on your device

Everything runs in your browser. Nothing you type is sent to Sellstamp or anyone else.

Building something to sell?

Sellstamp has a storefront, a checkout into your own payment account, automatic delivery and an API with webhooks. Open a free store

How to use it

  1. Paste well-formed XML.
  2. Check the JSON below; an error names the first problem in the XML.
  3. Copy it, or download it as a .json file.

Nothing you paste leaves this page

The conversion runs in this browser tab. Nothing is sent to Sellstamp or anyone else, which matters for configuration files, customer exports and tokens.

The mapping

Each element becomes a key; attributes become keys starting with @; text inside an element with attributes or children becomes #text; and elements that repeat become an array. The XML is read by your browser’s own parser, which does not fetch external entities or DTDs, so a hostile file cannot read anything else.

Questions

How are attributes shown?

As keys starting with @, for example @id.

Why is one item an object and another an array?

An element that appears once becomes an object; one that repeats becomes an array. Treat both cases in code that reads it.

What does “not well-formed” mean?

The XML has a structural error, such as a tag that is never closed. The message names it.

Are namespaces kept?

Element names keep their prefix, such as soap:Body.