Skip to content

JSON to XML Converter

Open or paste JSON and its XML appears at once, wrapped in a root element, ready to copy or download; nothing is uploaded.

Processed on your device. Nothing is uploadedHow to check

Try a sample file:

You can also paste JSON with Ctrl+V (⌘+V on a Mac).

Your file is opened in this browser tab only: it is never uploaded or stored anywhere, and it is gone when you close the tab.

  • JSONView and edit.json

Also works with CSV, TXT, Excel, Word, PDF, Image, and PowerPoint files

Paste text instead

Pasted text stays in this tab and is never sent anywhere.

Need XML for an older SOAP service, an import screen or a feed that will not take JSON? Open, drop or paste your JSON and the XML is shown straight away in a dialog. Each key becomes an element, each array item a repeated element with the same name, and everything sits inside one <root> element so the result is a well-formed document. Copy it or download it as an .xml file; the JSON stays open in the viewer, so you can change it and convert again.

Why use JSON to XML

  • Private

    Your JSON is converted by your own browser and never sent to a server, so nobody else sees it.

  • Well-formed every time

    One <root> element, escaped text and valid element names, so any XML parser can read the result.

  • Works offline

    After you have used it once, it keeps working without an internet connection.

How it works: convert JSON to XML

  1. Open or paste your JSON

    Choose a .json file, drop it on the page, paste it into the box, or try a sample.

  2. Read the XML

    The XML is shown at once in a dialog, indented, with the whole document inside <root>.

  3. Copy or download

    Copy the XML or download it as an .xml file with the JSON file's name.

How JSON becomes XML

  • Objects: each key becomes a child element, in the JSON's order, keys that are whole numbers such as "2024" included.
  • Arrays: each item becomes a repeated element named after the array's key, so "tags": ["a", "b"] gives two <tags> elements.
  • null becomes an empty element; numbers and true/false become element text.
  • Keys that are not valid element names (spaces, a leading digit, symbols) are changed into valid names.
  • Text with <, > or & is escaped, and Arabic and other non-Latin text is kept as it is.

JSON to XML: what it can't do

  • No attributes are written: every value becomes an element, so XML that needs attributes must be adjusted by hand.
  • Keys that had to be renamed do not convert back to their original spelling.
  • Files up to 10 MB.

JSON to XML: questions and answers

Is my file uploaded?
No. The JSON is read and turned into XML by your browser, on your device. Pasted text stays in this tab and is never sent anywhere.
Why is everything inside a <root> element?
An XML document must have exactly one top element, while JSON can have several keys at the top or be an array. Wrapping the result in <root> makes it a well-formed document every time.
How are JSON arrays written in XML?
XML has no arrays, so each item becomes its own element with the array's key as its name. A list of three users under "user" becomes three <user> elements in a row.
What happens to a key like "first name" or "2fa"?
Element names cannot contain spaces or start with a digit, so such keys are changed into valid names. Check the result if a program expects exact names.
Can I get attributes instead of elements?
No. The JSON to XML converter writes every value as an element and creates no attributes. That is the limit to plan for if your target format uses attributes.
Can I convert XML to JSON as well?
Yes, on the XML to JSON page.
How do I convert a JSON file to XML?
Open or paste the JSON in OpenAnyDoc's JSON to XML converter and the XML appears at once, wrapped in one <root> element. Copy it or download it as an .xml file; the JSON is converted in your browser without being uploaded.

Why it's private: your files never leave your browser

Most online viewers upload your file to a server, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.

How we tell you about new features

Announcements are based on the release date shown to everyone, and nothing is stored on your device or sent anywhere.