Skip to content
Free Online Tools
All Tools Text Tools Developer Tools Generators Converters Calculators Data & Converters Web & Design Encoders & Ciphers Networking Games About Blog News

XML to JSON

Data & Converters 100% in-browser

Paste XML and get a JSON representation of its elements and attributes.

How to use the XML to JSON

  1. 1 Paste well-formed XML.
  2. 2 Elements become keys; attributes are prefixed with @.
  3. 3 Copy the JSON.

About the XML to JSON

Legacy APIs and feeds often return XML. This tool converts XML into a JSON structure so it is easier to work with in JavaScript and modern tools.

Parsing uses the browser’s native XML parser — nothing is uploaded.

Frequently asked questions

How are attributes represented?

Attributes appear as keys prefixed with @, and repeated elements become arrays.

Is invalid XML handled?

Malformed XML shows an error message.

Related tools

JSON Formatter & Viewer Paste JSON to beautify, validate and explore it in a live collapsible tree — with search, expand/collapse and JSONPath.
YAML to JSON Paste YAML and get valid, formatted JSON instantly.
CSV to JSON Paste CSV (with a header row) and get a clean JSON array instantly.

More from us

Recently used