99+ Free Tools
← Back ✕ Close

XML to JSON Converter

Paste XML and get pretty-printed JSON instantly. Attributes keep an @ prefix; repeated elements become arrays.

An open notebook with data tables beside a laptop
Element text becomes JSON values; an element with attributes and text keeps its text under #text.

XML

JSON

Paste XML to see the JSON.

How this tool works

Method. The XML is parsed in your browser and rebuilt as JSON: child elements become keys, repeated elements become arrays, and attributes become @keys. Text inside an element with attributes or children is kept under #text.

Privacy. Everything happens in your browser. Nothing is uploaded or shared; the recent-conversions record stays on this device only.

Limits. Invalid XML — including unclosed tags — is refused with the parser's error message.