filemarkr
All ToolsGuides
filemarkr

60+ free developer tools that run entirely in your browser — JSON formatter, JWT decoder, Base64, diff checker, regex tester, hash generator and more. No upload, no sign-up, completely private.

JSON & Data

  • JSON Formatter
  • JSON Minifier
  • JSON Validator
  • JSON to CSV
  • CSV to JSON
  • JSON to YAML

Encode & Decode

  • Base64 Encode / Decode
  • Base64 to Image
  • Image to Base64
  • URL Encode / Decode
  • HTML Entity Encoder
  • JWT Decoder

Text Tools

  • Text Diff Checker
  • Case Converter
  • Word & Character Counter
  • Slug Generator
  • Remove Duplicate Lines
  • Sort Text Lines

Generators

  • UUID Generator
  • Password Generator
  • Lorem Ipsum Generator
  • QR Code Generator
  • Random Number Generator
  • NanoID Generator

Popular Guides

  • How to Format and Pretty-Print JSON (Without Breaking It)
  • How to Minify JSON and Shrink Your API Payloads
  • How to Validate JSON and Pinpoint the Exact Syntax Error
  • How to Convert JSON to CSV for Excel and Google Sheets
  • How to Convert CSV to JSON (With Proper Header Detection)
  • All guides →

Explore

  • All Tools
  • JSON Formatter
  • JWT Decoder
  • Diff Checker
  • UUID Generator

Company

  • About
  • Privacy
  • Terms
  • Sitemap

Our Promise

  • 100% in your browser
  • Zero uploads
  • No sign-up, always free

© 2026 filemarkr. Designed & developed by Naved Naik.  All processing happens locally in your browser.

All guides

JSON & Data

How to Convert JSON to Well-Formed XML for SOAP, RSS and Legacy APIs

Turn JSON into well-formed, indented XML for SOAP, RSS and legacy APIs. See how objects, arrays and null map to elements, plus escaping and root tags.

Try the toolJSON to XML →

XML has not gone anywhere

JSON dominates modern web APIs, but XML is still everywhere in the enterprise: SOAP web services, RSS and Atom feeds, sitemaps, Office documents, Android layouts and countless legacy integrations. Sooner or later you have data as JSON and a system that will only accept XML. Rewriting nested structures into angle brackets by hand is tedious and easy to get wrong — a single unescaped ampersand produces invalid XML.

How JSON maps to XML

JSON and XML do not line up perfectly — XML has attributes, namespaces and text nodes that JSON lacks — so a converter has to pick sensible conventions. The JSON to XML tool uses these rules:

  • Each JSON object key becomes an XML element wrapping its value.
  • A JSON array becomes repeated <item> elements, because XML has no native list type.
  • null and empty values become self-closing tags like <tag/>.
  • The characters &, < and > in text are escaped automatically.
  • You choose the name of the single root element that wraps the whole document.

A worked example

With the root element set to library, this JSON:

{
  "book": {
    "title": "Clean Code",
    "tags": ["craft", "quality"]
  }
}

becomes well-formed, indented XML:

<?xml version="1.0" encoding="UTF-8"?>
<library>
  <book>
    <title>Clean Code</title>
    <tags>
      <item>craft</item>
      <item>quality</item>
    </tags>
  </book>
</library>

Every level is indented two spaces and the XML declaration is prepended for you, so the output drops straight into a file or request body.

Pitfalls and things to expect

  • Arrays become <item>, not the key name. A JSON array under tags renders each element as <item>...</item> inside <tags>. If your target schema expects one <tag> per entry, rename after converting or restructure the JSON.
  • Everything becomes an element. JSON has no notion of XML attributes, so nothing is emitted as attr="value"; the result is purely nested elements. A schema that requires attributes will need a manual tweak.
  • Invalid element names get sanitized. XML names cannot start with a digit or contain spaces, so a key like "first name" or "123" is rewritten with underscores to keep the document well-formed.
  • Key order is preserved from the JSON object — but remember that not every JSON producer guarantees a stable key order.

Going the other way

When you receive XML and need JSON instead, the XML to JSON tool reverses the trip. And if you just want to tidy existing XML — fix indentation and spacing without changing structure — reach for the XML Formatter.

Conclusion

Generating XML from JSON by hand invites subtle well-formedness bugs; a deterministic converter handles escaping, indentation and the XML declaration so you can focus on whether the shape matches the target schema. Set your root element, paste the JSON, and copy the result — all locally in your browser, with nothing uploaded.

More guides

How to Format and Pretty-Print JSON (Without Breaking It)

Read

How to Minify JSON and Shrink Your API Payloads

Read

How to Validate JSON and Pinpoint the Exact Syntax Error

Read

How to Convert JSON to CSV for Excel and Google Sheets

Read