Zero Signup ToolsFree browser tools

Converter Tools

JSON to XML Converter

Convert JSON to well-formed XML in your browser. Configurable root, attributes, indent, declaration, and array handling. No upload, no signup.

Convert

JSON to XML

Output options

Used when JSON is not already wrapped in a single object property.

Used for items in a top-level JSON array.

Indent

JSON keys starting with this prefix become XML attributes. Set it empty to disable.

The JSON key whose value becomes the element's text content.

Null handling

Conversions run entirely in your browser. Nothing you paste is sent to a server.

How to use

  1. Paste a JSON document into the input area. Objects, arrays, and primitives all work.
  2. Set the Root element name (used when JSON is not already wrapped in a single object property) and the Array item name (used for items in a top-level array).
  3. Pick an indent (0 for minified, 2 or 4 spaces for human-readable output) and toggle the XML declaration if your consumer wants it.
  4. Use the Attribute key prefix to mark which JSON keys become XML attributes (@version, @xmlns, etc.) and the Text content key for elements with mixed content.
  5. Click Copy to grab the XML output, or Clear input to start over. The output panel shows element and attribute counts plus the byte size.

About this tool

JSON to XML Converter turns a JSON document into well-formed XML using the conventions developers actually expect when integrating with XML-based systems. Object keys become element names, arrays repeat the parent element name once per item (so ["a", "b"] under "tag" becomes <tag>a</tag><tag>b</tag>), and any key that begins with the configured attribute prefix (default @) becomes an attribute on the parent element rather than a child element. A reserved text key (default #text) lets you place plain text content alongside attributes inside the same element, which mirrors how SOAP envelopes, RSS feeds, Android string resources, and most XML serializers structure mixed content. Configure the root element name for top-level scalars and arrays, pick a child element name for items in a top-level array, choose between minified output or 2 / 4 space indent, and decide whether empty values are written as self-closing tags (<tag />) or expanded pairs (<tag></tag>). Null values can be omitted entirely, written as empty elements, or marked with the W3C xsi:nil="true" attribute (with the xmlns:xsi declaration added automatically). For .NET-style output, an Array wrap mode wraps arrays in a parent element and emits the items under a configurable child name. The emitter escapes &, <, >, double quote, and single quote per the XML 1.0 spec, validates element and attribute names against the XML Name production so invalid keys ("first name", "1key") are reported with a path before they break a downstream parser, and skips control characters that XML 1.0 forbids. The XML declaration <?xml version="1.0" encoding="UTF-8"?> can be added or removed with one click. Useful when preparing payloads for SOAP services, building RSS or Atom feeds from JSON APIs, generating Android strings.xml from a localization JSON file, producing config files for Java and .NET applications, and round-tripping data with the existing XML to JSON tool. All conversion runs locally in your browser, so the JSON you paste here never leaves your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools