Add to Chrome Add to Edge

XML To JSON

Convert an XML document or feed into JSON that is easy to use in code.

Format Options

XML To JSON

Modern APIs and JavaScript code work with JSON, but many feeds and older services still deliver XML. This tool converts an XML document into JSON so it is easy to use in code.

How to use XML To JSON

  1. Paste your XML into the input box.
  2. Adjust the options: Pretty Print JSON, Unescape Unicode Characters, Unescape Forward Slashes and Preserve CDATA Sections.
  3. Click Convert to JSON and copy the output.

When it comes in handy

  • Reading RSS, sitemap and SOAP responses in JavaScript projects.
  • Migrating data from XML exports into JSON-based systems.
  • Inspecting the structure of an XML file as a tree of objects.

Frequently asked questions

How are attributes represented?
There is no single standard. Check the output for how attributes appear and adapt your code to that shape.
Why is my XML rejected?
It must be well-formed: one root element, every tag closed and special characters escaped. Fix the syntax and try again.

Related guides

Related Tools

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.

Your tools

    Saved in this browser only. Nothing is sent to us.

    Popular tools