Toffeekit
  • Home
  • All tools513
  • Recent
  • Favorites
Categories
  • Images51
  • Video21
  • PDF33
  • AI24
  • Data21
  • SEO12
  • Developer32
  • Text27
  • Design18
  • Files13
  • Utilities5
  • Productivity17
  • Finance26
  • Math39
  • Education19
  • Date & Time29
  • Converters43
  • Fun & Random24
  • SaaS13
  • Business17
  • Social11
  • Media5
  • Security13
Buy me a coffee
ToffeekitDataXML ⇄ JSON

XML ⇄ JSON

Convert XML to JSON and back. Runs entirely in your browser — nothing you paste is sent anywhere.

Help
Runs locally Instant, no sign-up Works offline
How it works

How to use XML ⇄ JSON

  1. 01Choose a Direction: XML to JSON or JSON to XML.
  2. 02Paste your XML or JSON into the Input box, or click Sample.
  3. 03Toggle Keep attributes (@id) to decide whether XML attributes are included.
  4. 04Click Copy or Save to download data.json or data.xml, or press Swap to convert back.
Questions

XML ⇄ JSON FAQ

6 answers to what people ask most about the XML ⇄ JSON.

How do I convert XML to JSON?

Set Direction to XML to JSON and paste the XML. Elements become keys, and repeated elements with the same name become arrays.

What happens to XML attributes?

With Keep attributes on, they appear in the JSON with an @ prefix, so id="1" becomes "@id": "1". Turn it off to drop attributes completely.

Why does it say Line 3 with an XML error?

The XML is not well formed, for example a missing closing tag or an unescaped &. The error shows the line so you can fix it.

Can I convert an RSS feed or SOAP response?

Yes. Paste the XML and you get the same data as JSON, which is easier to work with in JavaScript.

Are numbers in XML turned into JSON numbers?

Yes, element text that looks like a number or boolean, such as 2026, is written as a JSON number rather than a string. Attribute values stay as strings.

Is XML ⇄ JSON free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so your files are processed on your device and never uploaded. It works on phones and computers alike.

Something not working? Tell us and we'll fix it.

Report an issue
More tools
CSV to JSON

Turn CSV rows into JSON objects.

Data
JSON to CSV

Flatten JSON into a CSV you can open in Excel.

Data
CSV Cleaner

Trim cells, drop empty rows, remove duplicates.

Data
Delimiter Converter

Switch between comma, semicolon, tab and pipe.

Data
Something off with XML ⇄ JSON? Report an issue or ask for a feature.Send feedback
© 2026 Toffeekit/Runs locally · No uploads · Free
AboutContactFeedbackPrivacyTermsCookiesSettingsllms.txt