FORMATFYCOM formátovač · validátor · minifikátor About

What's new

XML to JSON Converter

Convert XML to JSON: attributes, repeated elements as arrays, optional typed values. Explains and fixes XML errors. Free, in your browser.

Input

Output


      

How to convert XML to JSON

Converts XML to JSON: attributes as "@name", text next to attributes as "#text", repeated elements as arrays and empty elements as null. Optionally turns numbers and true/false into typed values.

  1. Paste XML

    Copy the data or drop a file. XML errors are explained and fixed just like in the formatter.

  2. Set up the conversion

    Options in the toolbar: indentation, delimiter, value types.

  3. Copy or download

    The JSON updates as you type; copy it or download it as a file.

What the conversion does

Attributes

<price currency="USD">39</price> → {"@currency": "USD", "#text": "39"}

Repeated elements

Several <book> elements → an array "book": [ … ]

XML errors

Invalid XML is explained and fixed first — the same error detection as the formatter.

FAQ

Why are numbers in quotes?

XML has no data types — everything is text. Turn on “numbers and true/false as values” to get numbers.

How are namespaces converted?

Element names keep their prefix (x:note); xmlns declarations become "@xmlns:x" attributes.

Is it free, without sign-up?

Yes. No sign-up, no ads and no size limit — the only limit is your computer.

Is my data sent to a server?

No. Everything runs in your browser and the data you paste never leaves it — fine even for data with tokens or personal information.

Related tools