html69// dev utilities

XML tool

XML to JSON Converter / JSON to XML Converter

An XML to JSON converter that also turns JSON into XML. Attributes, nested tags, and repeated elements stay in this tab.

Like the tool? Find a bug?Share with us

Converter

Paste XML. Attributes become @id. Repeated tags become arrays. Files stay on your device.

Supported files: .xml, .rss, .txt
0 / 50,000
JSON will appear here.

Guide

How this XML to JSON converter works

01

XML becomes JSON

The root element is the top JSON key. Attributes become @id. Repeated tags become arrays. Text inside an element is a string, or #text when the element also has children or attributes. Types can coerce numbers and booleans.

02

JSON becomes XML

A single object key becomes the root tag. Several keys wrap in <root>. Arrays repeat the same tag. Keys that start with @ write attributes. Declaration adds the XML prolog.

Use it

What converts well

Notes, RSS-like catalogs, SOAP-style tags, and JSON objects with a single root. DOCTYPE and ENTITY declarations are rejected. Mixed content keeps both text and child tags. The 50,000 character cap still applies.

FAQ

Questions

Does this upload my XML?

No. Conversion, copy, and download run in this tab. There is no account and no API call.

How are attributes stored?

An attribute named id becomes @id in JSON. JSON → XML writes those keys back as attributes.

What about YAML?

This converter is XML and JSON only. Use the YAML to JSON converter for YAML maps and lists.

Is there a size limit?

Paste is capped at 50,000 characters so a huge dump cannot freeze the tab.