XML to JSON Converter

Convert XML to JSON online: tags become keys, attributes are kept as @_-prefixed fields, and syntax errors report the exact line and column. Nothing is uploaded.

Files stay local .xml Max 20MB
Files stay local
or drag a file in (up to 20MB each)

Options

What this tool does

XML to JSON turns RSS feeds, build configs and system exports into JSON: tags become keys, repeated sibling tags merge into arrays, and attributes can be kept with an @_ prefix.

Syntax errors report the exact line and column, so no more hunting for the unclosed tag by eye. Everything runs in your browser; data is never uploaded.

How to use

  1. Paste XML or drop a .xml file Pasting is quickest; files can be up to 20MB, UTF-8 encoded.
  2. Decide on attributes Kept attributes are prefixed with @_ (e.g. @_id) so they never clash with child elements.
  3. Copy or download the JSON Pretty by default; turn it off to shrink output before feeding programs.

FAQ

Do repeated tags become arrays?

Yes. Same-name siblings merge into arrays; a single element stays an object.

Are attributes dropped?

Kept as @_-prefixed fields by default; dropped when the toggle is off.

Do errors include line and column?

Yes. Syntax errors always report line and column.

Is my file uploaded?

No. Validation and parsing happen entirely in your browser.

Are numeric texts converted to numbers?

Yes. Purely numeric text becomes numbers; alphanumeric IDs stay strings.

Does RSS / Atom work?

Yes. They are standard XML and follow the same rules.

Limits

Up to 20MB per file; UTF-8 text only.

No XSD/DTD validation; DOCTYPE internal entities are not expanded.

Namespace prefixes are preserved as-is; no JSON→XML reverse conversion.

Related tools