Skip to content
Free tool · Data & formats

JSON · YAML · XML Converter

Convert JSON to YAML, YAML to JSON, JSON to XML and XML to JSON in both directions as you type. Ideal for Kubernetes and CI configs, API payloads and integration mappings — nothing leaves your browser.

Runs in your browser — nothing is uploadedNo sign-up · no tracking of your input
From
To

Input · JSON

Output · YAML

How to use the JSON · YAML · XML Converter

  1. 1

    Choose the formats

    Select the source format and the target format: JSON, YAML or XML. The swap button reverses the direction and takes the result as the new input.

  2. 2

    Paste your data

    Paste a document or load an example. The output updates live, and syntax errors are shown with a clear message instead of a broken result.

  3. 3

    Copy the result

    Copy the converted document. For XML output you can set the root element name; attributes and text follow the @attr and #text convention.

FAQ

JSON · YAML · XML Converter: frequently asked questions

How do I convert JSON to YAML?

Select JSON as the source and YAML as the target, then paste your JSON. Objects become YAML mappings, arrays become lists and strings are quoted only when needed, so the result can be used directly in Kubernetes, Docker Compose or GitHub Actions files.

How are XML attributes and repeated elements converted to JSON?

Attributes become properties prefixed with @, for example @id. Text inside an element that also has attributes or child elements is stored as #text. Elements that occur more than once under the same parent become a JSON array.

How do I choose the root element when converting JSON to XML?

XML needs exactly one root element. If your JSON object has a single top-level key, that key is used as the root. Otherwise the data is wrapped in the root element name you enter, which is root by default. Invalid characters in names are replaced with underscores.

Are special characters escaped in the XML output?

Yes. The characters &, <, >, double and single quotes are escaped as entities in element text and attribute values, so the output is always well-formed XML.

Is my data uploaded when I convert it?

No. JSON and YAML are parsed with JavaScript and XML with the browser's built-in DOMParser. The conversion runs entirely on your device and nothing is sent to a server or stored.