gettoolz.app

JSON to XML Converter

Convert JSON into a well-formed, indented XML document.

Part of developer tools.

Your JSON
XML

The mapping

This is the reverse of the XML to JSON converter: keys starting with @ become attributes, #text becomes the element text, and arrays repeat the element. An object with a single key uses it as the root element; anything else is wrapped in <root>.

Escaping and names

Ampersands, angle brackets and quotes are escaped, and keys that are not valid XML names have their invalid characters replaced with underscores.

Is my data safe?

Yes. Everything runs in your browser — nothing you paste is sent to a server, so payloads with customer data or credentials stay on your machine. Large inputs of several megabytes are processed once you stop typing, without freezing the page.

More data tools

  • JSON Formatter — Validate and pretty-print JSON, right in your browser.
  • JSON Validator — Check whether JSON is valid and see the exact line and column of the error.
  • JSON Diff — Compare two JSON documents by structure and list every added, removed or changed value.
  • JSON to CSV Converter — Turn a JSON array into a CSV file, with nested keys flattened into columns.
  • CSV to JSON Converter — Turn a CSV file with a header row into a JSON array, with numbers and booleans typed.
  • JSON to YAML Converter — Convert JSON into clean, indented YAML for configs and manifests.
  • YAML to JSON Converter — Convert YAML to JSON, with anchors, aliases and multi-document files resolved.
  • XML to JSON Converter — Convert an XML document into JSON, attributes and repeated elements included.
  • JSON to TypeScript — Generate TypeScript interfaces from a sample JSON payload.
  • XML Formatter — Pretty-print or minify XML and catch malformed tags, right in your browser.
  • SQL Formatter — Format SQL queries with consistent indentation and upper-case keywords, per dialect.