# XML-zu-JSON-Konverter

> Konvertiere XML-Elemente und -Attribute in JSON.

[Open tool](https://www.toolcabana.com/de/xml-to-json) · [Entwicklung und Daten](https://www.toolcabana.com/de/category/developer-and-data)

Tool ID: xml-to-json. Requested language: de. Description language: de. Complete guide translation: yes.

## Overview (en)

XML to JSON converts well-formed XML into formatted JSON that keeps both elements and attributes. Attributes appear as keys prefixed with @_, repeated sibling elements become arrays, and element text that looks like a number is converted to a number. Invalid XML is reported with a line number, and DOCTYPE or entity declarations are refused.

## Supported tasks (de)

Konvertiere XML-Elemente und -Attribute in JSON.

## Steps (de)

1. Füge die Quelle in den Eingabe-Editor ein oder lade das integrierte Beispiel.
2. Prüfe das Quellformat, bevor du den Vorgang ausführst.
3. Führe den XML-zu-JSON-Konverter aus, prüfe die Ausgabe und verwende dann die verfügbaren Bedienelemente zum Kopieren oder Herunterladen.

## Settings

No additional settings.

## Limitations (de)

Textvorgänge akzeptieren im Allgemeinen bis zu 2.000.000 Zeichen. Einzelne Parser, Generatoren und Formeln haben zusätzliche Grenzen, die in ihren Bedienelementen angezeigt werden.

## Example input

```text
<root><name>ToolCabana</name><count>2</count></root>
```

## Privacy and connections (de)

Dieser Vorgang verarbeitet seine Quelle in deinem Browser. Kopieren und Herunterladen sind ausdrückliche Aktionen; die Quelleingabe wird nicht in einem Konto oder Verlauf gespeichert.

## Questions (de)

### How are XML attributes shown in JSON?

Attributes are kept and appear on their element object as keys starting with @_, so id="1" becomes "@_id": "1". Attribute values stay strings.

### What happens to repeated XML elements when converting to JSON?

Sibling elements with the same name are grouped into a JSON array under that name. A single occurrence stays a plain value or object.

### Why did XML to JSON remove leading zeros?

Element text that looks like a number is parsed as a JSON number, so a value such as 007 becomes 7. Keep codes as attributes if their exact text matters.

### Wo wird meine Eingabe verarbeitet?

Dieser Vorgang verarbeitet seine Quelle in deinem Browser. Kopieren und Herunterladen sind ausdrückliche Aktionen; die Quelleingabe wird nicht in einem Konto oder Verlauf gespeichert.

### Welche Eingabelimits gelten?

Textvorgänge akzeptieren im Allgemeinen bis zu 2.000.000 Zeichen. Einzelne Parser, Generatoren und Formeln haben zusätzliche Grenzen, die in ihren Bedienelementen angezeigt werden.

## Related tools

- [YAML to JSON](https://www.toolcabana.com/de/yaml-to-json)
- [JSON to YAML](https://www.toolcabana.com/de/json-to-yaml)
- [CSV to JSON](https://www.toolcabana.com/de/csv-to-json)
- [JSON to CSV](https://www.toolcabana.com/de/json-to-csv)
