MentorMakers Login Sign up

Do More with MentorMakers

Free tools. Powerful features. Built for a smarter tomorrow.

  • 260 Free Tools
  • Most tools — no signup
  • Temporary files handled for processing
  • AI Assistant built in
  • Made in Pakistan
Explore All Tools

XML to JSON Converter

Paste XML (or open a file) and get the same data as JSON.

How XML becomes JSON

  • The root element becomes the top-level key.
  • Child elements become properties. If an element name repeats (several <book> tags), they become a JSON array.
  • Attributes become properties prefixed with @ (id="1" → "@id": "1"), or you can drop them.
  • An element with both text and children keeps its text as "#text".
  • With "detect numbers", values such as 450 and true become JSON numbers and booleans instead of strings. Leave it off to keep codes like 0300 exactly as written.

Watch out for single items

XML doesn't say whether an element is a list. A catalog with only one <book> gives an object, and with two it gives an array. If your code expects arrays every time, tick "Always use arrays". Comments and processing instructions are left out; namespaces stay in the element names (for example "soap:Body").

The conversion uses your browser's XML parser, so invalid XML gives a clear error and nothing is uploaded. To go the other way or to edit JSON, see the JSON Formatter and CSV to JSON tools.

Free to useNo software to install — works in any modern browser.
No signup neededOpen the tool and start straight away.
Your file stays on your deviceEverything happens in your browser — nothing is uploaded.
Works on mobileSame tool on your phone, tablet or desktop.

Prefer to just describe the task? The AI Assistant can convert, compress and resize files from a short instruction.

Rate this tool

Log in to leave a review.

Processing your file…
Large files, OCR and video can take a minute or two — please keep this page open.
Bookmark this page
Press Ctrl+D for quick access next time