T

Text Machine

Powerful text tools, in your browser

JSON ↔ YAML Converter

Convert JSON to YAML and YAML back to JSON right in your browser. Paste either format to get clean, correctly-indented output — ideal for config files, CI pipelines, and Kubernetes manifests.

Indent

JSON input
YAML output

Enter data above to see the converted result here.

How to use JSON to YAML Converter

  1. 1

    Choose a direction

    Use the toggle to pick JSON to YAML or YAML to JSON. The swap button moves your result into the input so you can convert it back the other way.

  2. 2

    Paste your data

    Paste JSON or YAML into the input box. The conversion runs automatically as you type, with structure, nesting, and data types preserved.

  3. 3

    Pick the indent

    Choose a 2-space or 4-space indent to match your project's style. The output stays clean and correctly indented for either format.

  4. 4

    Copy the result

    Review the converted output and copy it to your clipboard, ready to drop into a config file, a pipeline, or your code.

Frequently asked questions

What is the difference between JSON and YAML?
JSON is a strict, brace-and-bracket data format that is ideal for APIs and machine exchange. YAML is a human-friendly superset of JSON that uses indentation instead of braces and supports comments, which makes it popular for configuration files such as Docker Compose, GitHub Actions, and Kubernetes manifests.
How do I convert JSON to YAML?
Paste your JSON into the input and the tool parses it and re-serializes it as YAML, preserving structure, nesting, arrays, and data types like numbers, booleans, and null. Pick the indent width to match your project's conventions.
Can it convert YAML back to JSON?
Yes. Switch the direction to YAML to JSON and the tool parses your YAML and outputs valid, pretty-printed JSON. Note that YAML comments are not carried over, because JSON has no comment syntax.
Is parsing untrusted YAML safe here?
Yes. The converter uses the safe YAML schema, which only loads standard data types — maps, sequences, strings, numbers, booleans, and null — and never executes code or instantiates custom types. Pasting untrusted YAML cannot run anything in your browser.
Is my data uploaded to a server?
No. All parsing and conversion happen entirely in your browser. Your data is never uploaded, logged, or stored, so it stays completely private and the tool keeps working even when you are offline.

Related tools

Keep going with these handy tools

JSON to CSV Converter

Unix Timestamp Converter

Binary ↔ Decimal Converter

Decimal ↔ Binary Converter

CSV to JSON Converter

Text to Binary Converter