XML to JSON
Convert XML to JSON online. Choose how attributes are written, force lists, and keep numbers as text or detect them. Free and private.
More options
XML
Stays in your browserJSON
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to JSON Beautifier, JSON Visualizer or JSON to CSV.
Free Online XML to JSON
Paste XML and get JSON. You choose whether attributes appear with an @ prefix or merged beside the child elements, and whether single children are always lists. It gives developers a quick browser-based way to solve a focused xml to json task before moving the result into a project.
How to use XML to JSON
Paste your data into the box on the left, or open a file, then press Convert. Repeated sibling elements become a list. Text next to attributes is kept under the key #text.
Common mistakes
- Pasting XML with more than one root element: XML allows only one, and the error shows the line.
- Expecting namespaces to be removed: prefixed names such as ns:item are kept.