Skip to tool
FreeToolsKit

JSON to XML Converter

Convert JSON to XML in your browser — paste or upload .json, copy or download .xml.

FreeNo uploadNo sign-up

Last updated:

Advertisement

Tool

Valid XML

Indent

Valid JSON

Valid XML · 459 B

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
</book>
</catalog>

Your files never leave your device - processing happens in your browser.

Related tools: XML to JSON Converter · JSON Formatter · XML Formatter

A JSON to XML converter is a tool that turns JSON data into XML markup — the format many older APIs, feeds and config files still expect — keeping the same data in a structure an XML parser can read directly. FreeToolsKit's converter runs entirely in your browser: paste JSON or upload a .json file and the XML appears live, with 2-space or 4-space indentation and an optional XML declaration. Your JSON is parsed in your tab and never sent to a server.

How do you convert JSON to XML?

  1. Paste your JSON into the JSON box — or press Sample to load a bookstore catalogue example, or Upload .json to load a file.
  2. Choose 2 spaces or 4 spaces for the XML indent, and switch the XML declaration on or off; the XML updates live as you type.
  3. If the JSON is invalid, read the error message — it names the line and column of the problem.
  4. Press Copy XML to take the result, Download .xml to save it as a file, or Reset to return to the sample.

What is the JSON to XML Converter used for?

  • Turning a JSON API response into XML for a system that only accepts XML.
  • Converting app config or catalogue data out of JSON and into an XML-based workflow.
  • Building a sample XML file from JSON data to test an XML parser or importer.
  • Checking how JSON maps to XML — attributes, repeated elements and text — before writing a converter.
  • Preparing JSON data as an RSS-style feed or sitemap fragment that needs XML markup.

Frequently asked questions

Is the JSON to XML converter free?

Yes. The tool is completely free with no sign-up and no usage cap. Convert as much JSON as you like, as often as you like.

Is my JSON uploaded anywhere?

No. Conversion happens in your browser tab with the built-in JSON parser. Configs and API responses containing tokens or personal data stay on your device — nothing is uploaded or logged.

How are attributes, arrays and text converted?

Keys starting with @ become attributes, so "@id": "bk101" gives id="bk101" on the element. A "#text" key becomes the element's text, and a JSON array becomes repeated elements with the same tag. A top-level object with one key uses that key as the root element; anything else is wrapped in a <root> element, and a top-level array becomes <item> elements.

What happens to null, numbers and booleans?

Null becomes an empty element such as <tag/>. Numbers and booleans become text — 44.95 stays 44.95 and true stays true. An empty object or an empty array also becomes an empty element.

What are the limits?

JSON is limited to 100,000 characters — longer input shows an error and the output stays empty until it is shortened. With an empty box the tool shows “No JSON yet”. Keys must be valid XML element names: they cannot start with a digit or with “xml”, and attribute values must be text, a number, true, false or null. You can also upload a .json file instead of pasting.

Advertisement

Related tools

Last updated:

  • Free forever
  • Files stay on your device
  • No sign-up