Convert XML to clean, structured JSON instantly.

Paste raw XML and get formatted, minified, or tree-viewable JSON in real time. Private, zero-upload, and runs entirely in your browser.

Valid XML

34 lines · 1.1 KB

XML input1.1 KB · 34 lines
JSON outputjson
{
  "?xml": {
    "@_version": 1,
    "@_encoding": "UTF-8"
  },
  "project": {
    "metadata": {
      "version": "2.4.0",
      "author": "JSONGlow Engineering",
      "license": "MIT",
      "released": true
    },
    "features": {
      "feature": [
        {
          "name": "XML to JSON Converter",
          "category": "data-transformation",
          "latencyMs": 1.2,
          "description": "Fast, browser-based XML parsing with zero server upload.",
          "@_id": "f-01",
          "@_enabled": true
        },
        {
          "name": "JSON Tree Viewer",
          "category": "visualization",
          "latencyMs": 0.8,
          "description": "Collapsible hierarchical navigation for large objects.",
          "@_id": "f-02",
          "@_enabled": true
        },
        {
          "name": "Cloud Sync",
          "category": "storage",
          "latencyMs": 0,
          "description": "Privacy-first mode ensures no remote storage is used.",
          "@_id": "f-03",
          "@_enabled": false
        }
      ]
    },
    "metrics": {
      "stars": 1420,
      "rating": 4.95,
      "contributors": 12
    },
    "@_name": "JSONGlow",
    "@_status": "active"
  }
}

# 49 lines · 1,205 chars

01 · How conversion works

From XML markup to modern JSON structures.

XML and JSON are the two most common data exchange formats, but translating between them requires care with attributes, repeated elements, and value types. XML tags naturally map to JSON object keys, while repeated sibling tags collapse cleanly into JSON arrays.

jsonglow's converter gives you full control over XML attributes—prefix them with '@_' or '@', merge them directly into the parent object, or ignore them completely. You can also toggle automatic type inference to cast numeric and boolean text nodes directly into native JSON types.

02 · Capabilities

Complete control over your conversion.

Live error reporting

Malformed XML tags, unclosed entities, and syntax issues are flagged with exact line and column coordinates.

Attribute customization

Choose how attributes are represented: standard @_ prefix, XPath-style @ prefix, clean properties, or ignored.

Automatic type inference

Numbers, floats, and booleans in text nodes can be automatically converted to native JSON data types.

Interactive tree view

Explore deeply nested XML structures through collapsible JSON nodes.

Format or minify

Switch between 2-space, 4-space, tab-indented, or single-line minified JSON with a single click.

100% Client-side privacy

No API calls, no analytics on your payloads, and zero data leaves your local machine.

03 · FAQ

Quick answers.

How are XML attributes converted to JSON?+

Attributes are preserved as object properties prefixed with '@_' by default (e.g. <book id="12"> becomes { "@_id": 12 }). You can customize this to use '@', no prefix, or ignore attributes completely via the toolbar selector.

How are repeated XML elements handled?+

When multiple child elements share the same tag name, the converter automatically bundles them into a clean JSON array.

Can I convert numbers and booleans from strings?+

Yes. With 'Types: Auto' enabled, numeric and boolean strings are automatically parsed to native numbers and booleans. Switch to 'Types: String' if you prefer raw string preservation.

Is my XML data uploaded to any server?+

No. The entire conversion process runs purely inside your browser using fast, client-side Web APIs. Nothing is transmitted over the network or stored on any remote server.

Can I explore large converted JSON files with a tree view?+

Yes. Toggle 'Tree view' in the toolbar to expand and collapse deep structures and inspect properties at your own pace.

04 · Related tools

The jsonglow toolkit.