Skip to content

JSON to XML

Turn JSON objects and arrays into well-formed XML.

  • 100% Free
  • No Sign Up
  • Nothing Uploaded

JSON to XML

Turn JSON into well-formed XML

JSON input

XML output

Output-

Processed on your device. Nothing is uploaded.

More converters

View all tools

Every format, one private converter.

No software. No uploads. No sign-up.

Browse all 96 tools
Files uploaded
0
Free tools
96
In your browser
100%

How to convert JSON to XML

Three steps, all in your browser.

  1. 1

    Paste or open your data

    Drop a file or paste rows straight into the input box.

  2. 2

    Check the options

    Delimiter, header row, indentation: the output updates live.

  3. 3

    Download

    Save the converted file, or copy the output.

JSON to XML: what to know

JSON and XML both describe structured data, but older APIs, feeds and enterprise systems often still expect XML. This converter turns any JSON value into well-formed XML in your browser.

Everything is wrapped in a root element. Object keys become child elements, and values become their text. A top-level array becomes a series of item elements, while an array under a key repeats that key, so {"tag": ["a", "b"]} becomes <tag>a</tag><tag>b</tag>. Keys starting with @_ become attributes and a #text key becomes the element's text, which matches what the XML to JSON converter produces, so data can go back and forth. If your JSON is a single object that wraps everything, such as {"catalog": {...}}, its key is used as the root element unless you set one.

XML has stricter naming rules than JSON, so names are fixed where needed: spaces and symbols become underscores and a name that starts with a digit gets an underscore in front. Ampersands and angle brackets in text, and quotes in attributes, are escaped. The file starts with an XML declaration for UTF-8.

Popular uses

  • Sending data to SOAP services or older APIs that expect XML
  • Creating XML config or feed files from JSON
  • Moving data between web apps and enterprise systems

Tips for the best result

  • Rename the root and item elements to match the schema you're targeting.
  • Use @_ keys in your JSON for values that must be attributes.
  • Choose 0 indentation for a compact file, or 2 or 4 spaces to read it.
  • Validate the output against your schema if the receiving system is strict.

Read how JustYourConvert works and our privacy details. Keep your original files and check a converted file before you replace anything.

Frequently asked questions