XML to JSON Converter

Read XML elements, repeated nodes, attributes, and text as JSON.

Local processing

Drop a file here, or paste your data. Maximum 10 MB. Text files must use UTF-8.

Ready when you are.

Your data is processed in your browser and is not stored on our servers.

JSON numbers use JavaScript precision. Quote large identifiers to preserve their digits. Duplicate object keys keep the last value.

What is XML to JSON Converter?

Read XML elements, repeated nodes, attributes, and text as JSON.

Attributes appear under @attributes. Repeated child elements become arrays. Text beside child elements is stored under #text. Namespaced names keep their prefixes.

Why use XML to JSON Converter?

Use this tool to inspect a small dataset or prepare data for another application without installing software. Processing takes place in this browser. No account is required.

How to use XML to JSON Converter

  1. Paste your input, upload a file, or load Sample Data.
  2. Choose any applicable options and select Convert.
  3. Review the output, then copy or download it.

Example

Input

<people><person id="1">Ada</person><person id="2">Lin</person></people>

Output

{"people":{"person":[{"@attributes":{"id":"1"},"#text":"Ada"},{"@attributes":{"id":"2"},"#text":"Lin"}]}}

Common problems

DOCTYPE and entity declarations are rejected. Whitespace-only text is ignored. Mixed-content text order and XML comments are not preserved. Text values remain strings.

Frequently asked questions

Is my conversion data uploaded?

No. Conversion inputs and outputs remain in this browser. Contact form messages are handled separately by WordPress.

Can I process large files?

The default limit is 10 MB. Browser memory and data complexity can impose lower practical limits.

Do I need an account?

No account is needed to use this tool.

Related tools