Skip to content
Developer & CodeLocal · Stays on device

XML to JSON Converter

Convert XML documents to JSON with control over attributes, text keys, arrays and value parsing.

  • XML, JSON
  • Free to use
  • No sign-up or watermark
xml-to-json-converterOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10

About this tool

Paste XML and get JSON. Attributes are included with a prefix you choose (default @_), element text that sits alongside attributes or children uses a text key (default #text), repeated child elements become arrays, and numbers and booleans can be converted automatically. Turn on Always use arrays when you need the same JSON shape whether an element appears once or many times.

Invalid XML is reported with its line and column. External entities (a common attack in untrusted XML, known as XXE) are refused and never fetched. Mixed content such as <p>Hello <b>you</b></p> can’t keep its original order in JSON, so text and child elements are stored under separate keys. Everything runs in your browser. Your data is never uploaded, logged or stored.

  1. Input

    Your code or text

    XML, JSON

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelinefast-xml-parser (MIT)

How to use it

  1. 1

    Paste your XML.

  2. 2

    Choose how attributes, text, arrays and values are handled.

  3. 3

    Copy or download the JSON.

Zero-upload architecture

How to use XML to JSON Converter for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open XML to JSON Converter

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Choose how attributes, text, arrays and values are handled.

  3. 3

    Get your result

    Copy or download the JSON.

  • Local

    XML Formatter

    Pretty-print or minify XML while keeping comments, CDATA and declarations intact, with exact line and column validation errors.

    Open tool
  • Local

    JSON Formatter

    Pretty-print, beautify and validate JSON with precise error locations, key sorting and custom indentation.

    Open tool
  • Local

    YAML to JSON Converter

    Convert YAML to JSON and JSON to YAML, including multi-document YAML files.

    Open tool
  • Local

    CSV to JSON

    Convert CSV or Excel-exported data to JSON objects or arrays, with automatic type detection.

    Open tool