JSON to XML Converter

Convert any JSON to clean XML in your browser. Supports attributes, arrays, custom root, XML declaration. Free and private. 100% free and private.

How to use

  1. Paste JSON — Drop in valid JSON; nested objects and arrays are supported.
  2. Set Root & Options — Pick a root element name, toggle indent and XML declaration.
  3. Copy XML — Use the result for SOAP, RSS, config files, or legacy integrations.

Frequently asked questions

How are JSON arrays converted?

Each array item is emitted as a sibling element with the same tag name — e.g. an array under 'book' produces multiple <book> elements, mirroring the convention used by our XML to JSON tool.

Can I add XML attributes from JSON?

Yes. Place an '@attributes' object inside any value — its keys become XML attributes on the surrounding element. A '#text' key becomes the element's text content.

What if my JSON key contains spaces?

Keys that aren't valid XML names (must start with letter/underscore, no spaces) are emitted as <item> elements to keep the XML well-formed.

Is the conversion lossless?

JSON → XML loses type information (everything becomes a string in XML). Round-tripping back via XML to JSON yields strings, not numbers or booleans.

Does it preserve the original order?

Yes — JSON object insertion order is preserved in the output XML.

What about XML namespaces?

Use the `@xmlns` key to add a namespace; the tool emits it as the standard XML namespace declaration.

Is my JSON sent to a server?

No — conversion is entirely local.

Can the XML be pretty-printed?

Yes — toggle indentation (2-space, 4-space, or none) in the options.

Will it handle nested arrays?

Yes — each array becomes repeated elements, and inner arrays nest the same way.

The JSON to XML Converter turns JSON data into clean, well-formed XML — useful for legacy SOAP integrations, RSS feed generation, configuration files, and migrating from JSON APIs to XML-based partners.

Conventions

  • Each JSON key becomes an XML element.
  • JSON arrays become repeated sibling elements.
  • "@attributes" objects become XML attributes.
  • "#text" becomes the element's text content.
  • Keys with invalid XML characters are emitted as <item>.

When to use

  • Generating SOAP payloads from JSON sources.
  • Producing RSS or Atom feeds from a JSON CMS.
  • Exporting JSON config to legacy XML tooling.
  • Building sitemaps from JSON URL lists.

Privacy

Conversion happens entirely in your browser; no payload is uploaded. Safe for internal data, secrets, and customer information.

Related free tools

  • XML Formatter & Minifier — Beautify or minify any XML — SOAP, RSS, SVG, sitemap. Browser-based parser.
  • XML to JSON Converter — Parse any well-formed XML into a clean JSON tree with attributes and arrays.
  • CSV Viewer — Open CSV or TSV files in your browser — sort, search, paginate, export filtered view.
  • JSON to CSV Converter — Convert JSON data to CSV format. Export to spreadsheets easily.
  • CSV to JSON Converter — Convert CSV data to JSON format. Useful for API development.
  • JSON Formatter — Format, beautify, or minify JSON with customizable indentation.
  • JSON Validator — Validate JSON syntax and find errors with line and column numbers.
  • HTML Minifier — Compress HTML by removing comments, whitespace, and line breaks.
  • CSS Minifier — Minify CSS by stripping comments, whitespace, and unnecessary characters.
  • JavaScript Minifier — Compress JavaScript by removing comments, whitespace, and empty lines.
  • Base64 Encoder/Decoder — Encode text to Base64 or decode Base64 back to text. UTF-8 support.
  • URL Encoder/Decoder — Percent-encode text for URLs or decode encoded URLs back to text.

Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools