JSON Input JSON
โš ๏ธ Invalid JSON โ€” please check your input.
XML Output XML

How JSON to XML Conversion Works

This converter maps each JSON key to an XML element tag. JSON objects become nested XML elements, and JSON arrays are serialised as repeated child elements using the configured array item tag name (default: <item>). The root JSON object is wrapped in a configurable root element tag (default: <root>).

JSON values that contain special XML characters (<, >, &, ", ') are automatically escaped. If you enable the CDATA option, string values are wrapped in <![CDATA[...]]> sections instead, which preserves the raw content including any HTML or markup within string values.

Key Naming Rules

XML element names must start with a letter or underscore, cannot contain spaces, and must not start with the string "xml". If your JSON has keys that violate these rules (e.g. numeric keys, keys starting with numbers, or keys with spaces), the converter automatically prefixes them with an underscore to produce valid XML.

When to Use XML Instead of JSON

JSON is lighter and more human-readable for most APIs and web applications, but XML remains the standard for SOAP web services, Microsoft Office document formats (OOXML), RSS/Atom feeds, SVG, and many enterprise integration systems. The XML declaration (<?xml version="1.0" encoding="UTF-8"?>) is optional for embedded XML but required for standalone XML files.

Related Tools