JSON / JSON TO XML

JSON to XML Converter

Convert JSON objects and arrays into XML with fast-xml-parser, including reverse XML → JSON conversion. Processing happens locally in your browser, with no account and no uploads.

JSON formatting workbench

workspace.json — live session
INDENT
SORT
01 / RAW INPUT 0 LINES · 0 B
02 / FORMATTED OUTPUT 0 LINES · 0 B
Awaiting input ⌘/CTRL + ↵ TO FORMAT
RESULT / CONVERT
// Result will appear here
HOW IT WORKS

JSON has one shape for everything; XML has three.

Output is wrapped in a root element and formatted. An array repeats its tag, an object nests, a scalar becomes element text, and a key beginning with @ becomes an attribute instead of a child element.

JSONXML
"tags": ["a", "b"]<tags>a</tags> <tags>b</tags>
"at": { "@id": 7, "#text": "hi" }<at id="7">hi</at>
"n": nullan empty element: <n/>
"ok": true<ok>true</ok> — text, not a boolean type
The converter writing XML: an array repeated as two tags elements, an @-key emitted as the id attribute on at, null as an empty element and true as element text
Three rows of the mapping table, in one export

Names decide whether the result is usable

  • ▸An element name cannot contain a space or start with a digit. Keys like bad key are written verbatim by the library and become markup that will not parse, so rename them first; the built-in fallback replaces an illegal name with item instead.
  • ▸XML does not distinguish "one element" from "a list of one", so a single-item array and a scalar produce the same document.
  • ▸JSON has no namespace concept, so a prefixed element only appears if your keys already carry the prefix.

NOTE Round-tripping JSON → XML → JSON will not always return the keys you started with. Treat this as a one-way export unless the receiving system is the one that defines the shape.

What you get on this page

  • ▸Powered by fast-xml-parser
  • ▸Attributes and text nodes preserved on import
  • ▸XML escaping handled automatically
  • ▸Reverse XML → JSON conversion

Because bracekit is a static application, this page loads quickly, caches well and never sends your data to a parsing server. Your formatting preferences, recent documents and snippets stay in local storage.

ANSWERS

JSON to XML questions

Can I convert XML back to JSON?

Yes. Select XML → JSON in the Convert module. Attributes are prefixed with @ and text nodes use #text.

How are arrays converted?

Repeated XML elements with the same name become arrays in JSON, and JSON arrays become repeated XML elements.

Is the XML validated?

Yes. fast-xml-parser validates the document before parsing and reports invalid XML.

Is my JSON data uploaded to a server?

No. Parsing, formatting, conversion, validation and comparison all run in your browser with JavaScript. Your data is never transmitted, and history is stored only in your local storage.

Is bracekit free to use?

Yes. Every tool is free, requires no account and has no usage limits. Once a page has been visited, the offline cache lets it reopen without a connection; only the Google Fonts files need the network, and system fonts are used while you are offline.

TOOL MATRIX

Keep working

Keyboard shortcuts
FORMATTING
Format input Ctrl/⌘ + Enter
Toggle auto-format Ctrl/⌘ + Shift + A
CLIPBOARD & FILES
Copy output Ctrl/⌘ + K
Open JSON file Ctrl/⌘ + O
Download output Ctrl/⌘ + S
Save snippet Ctrl/⌘ + Shift + N
MODULES
Open find & replace Ctrl/⌘ + Shift + F
Lock / unlock output Ctrl/⌘ + Shift + L
Show this dialog Ctrl/⌘ + /
Local history
Save snippet
Erase local data

Nothing is stored in this browser yet.

Removes the saved draft, history, snippets and formatting options for this site. Documents you typed stay in the editor until the page reloads.