XML Formatter
Pretty-print or minify XML while keeping comments, CDATA and declarations intact, with exact line and column validation errors.
Open toolConvert XML documents to JSON with control over attributes, text keys, arrays and value parsing.
Paste XML and get JSON. Attributes are included with a prefix you choose (default @_), element text that sits alongside attributes or children uses a text key (default #text), repeated child elements become arrays, and numbers and booleans can be converted automatically. Turn on Always use arrays when you need the same JSON shape whether an element appears once or many times.
Invalid XML is reported with its line and column. External entities (a common attack in untrusted XML, known as XXE) are refused and never fetched. Mixed content such as <p>Hello <b>you</b></p> can’t keep its original order in JSON, so text and child elements are stored under separate keys. Everything runs in your browser. Your data is never uploaded, logged or stored.
Your code or text
XML, JSON
Processed in this browser
Instant, in-browser. Nothing is uploaded.
Your result
Ready to download or copy
Paste your XML.
Choose how attributes, text, arrays and values are handled.
Copy or download the JSON.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Choose how attributes, text, arrays and values are handled.
Copy or download the JSON.
Pretty-print or minify XML while keeping comments, CDATA and declarations intact, with exact line and column validation errors.
Open toolPretty-print, beautify and validate JSON with precise error locations, key sorting and custom indentation.
Open toolConvert YAML to JSON and JSON to YAML, including multi-document YAML files.
Open toolConvert CSV or Excel-exported data to JSON objects or arrays, with automatic type detection.
Open tool