Are XML attributes supported?
Yes. Prefix a key with @_ (`@_id`, `@_priority`) and it is emitted as an attribute on the parent element.
Paste JSON on the left and copy XML on the right. Objects become elements, arrays repeat children, and keys that start with @_ become attributes. Built for configs, SOAP snippets, and feeds that still want XML.
JSON formatter
Run a tool to see a polished result here
A JSON object is an element with child elements named after its keys. A JSON array repeats the child element (or a wrapper) once per item. Strings, numbers, booleans, and null become text nodes. Invalid JSON is rejected before any XML is emitted. XML-to-JSON lives in the same sidebar if you need the opposite direction.
Want rows and headers instead of elements? JSON → CSV turns an object array into CSV text.
Want a downloadable workbook with flattened columns? JSON to Excel builds a real .xlsx file locally.
Need indentation-based config rather than markup? JSON → YAML keeps the nested object as YAML.
Conversion fails immediately? The JSON validator shows the syntax error; this page only accepts JSON that parses.
The builder treats keys that start with @_ as attributes of the parent element, using the name after the prefix. `"note": { "@_priority": "high", "to": "dev" }` becomes `<note priority="high"><to>dev</to></note>`. A key named `priority` without the prefix becomes a child element `<priority>`. If you need namespaces, put the xmlns declaration on @_xmlns (or a similarly prefixed key) rather than hoping the converter infers one.
{ "note": { "@_priority": "high", "to": "dev" } }
→ <note priority="high">
<to>dev</to>
</note>JSON arrays do not have a tag name of their own. The converter repeats the parent’s child node. Mixed arrays (`[1, {"n":2}]`) produce mixed children and are legal XML but painful to schema. JSON keys with spaces or leading digits are not legal XML names; rename them before converting or expect the builder to emit a name you will have to fix. Booleans become the text `true`/`false`, not `1`/`0`.
If the reason you opened this page is “I want to open JSON in Excel”, you are on the wrong converter. XML preserves nesting. CSV and Excel flatten it. Keep JSON to XML for hierarchical documents, and use JSON to CSV / JSON to Excel when each object should be a row.
The sample is a `note` object with `@_priority`, `to`, `from`, and `body`. After conversion you should see a `<note priority="high">` element with three child elements. Change `@_priority` to `priority` if you would rather have a child element than an attribute.
{
"note": {
"@_priority": "high",
"to": "dev",
"from": "jfmt",
"body": "local conversion"
}
}Use JSON to XML when a downstream system still speaks XML: SOAP bodies, RSS-like feeds, Android-style resource files, or an enterprise bus. Do not use it as a pretty-printer for JSON, and do not use it when the output has to be columns in Excel.
Also try JSON to Excel, JSON → CSV, JSON beautifier, JSON validator, or JSON → YAML. The JSON formatter on the homepage is the general workspace.
Yes. Prefix a key with @_ (`@_id`, `@_priority`) and it is emitted as an attribute on the parent element.
Array items become repeated child elements. There is no automatic wrapper tag named `item` unless you add that key yourself.
This URL starts in JSON→XML. Switch the sidebar to convert the other way without leaving the editor.
Keys should already be legal XML names. Spaces and leading digits are the usual failures — rename those keys in JSON first.
No. Conversion runs in the browser.