Skip to content

JSON to YAML Converter

Turn JSON into clean YAML for config files, Kubernetes and CI pipelines.

Paste JSON or open a .json file and this converter writes the same data as YAML while you type. Objects become indented keys, arrays become "-" lists, and multi-line strings are written as readable | blocks. Strings are quoted only when YAML would otherwise misread them.

YAML is the format of choice for Kubernetes manifests, Docker Compose, GitHub Actions, Ansible and many app config files. If your JSON has a syntax error, the tool tells you where, and nothing is uploaded: the conversion runs in your browser.

How to use the JSON to YAML tool

  1. Paste your JSON or open a .json file.
  2. Choose 2 or 4 spaces of indentation.
  3. Read the YAML output, which updates as you type.
  4. Copy it or download it as a .yaml file.

Why use ToolOrca JSON to YAML

  • Live conversion as you type
  • Quotes strings only when needed
  • Multi-line strings as block scalars
  • 2 or 4 space indentation
  • Clear JSON error messages
  • Copy or download .yaml

Why some strings get quotes

YAML guesses the type of unquoted values, so the string "yes" would become the boolean true in many parsers, and "0123" would become a number. To keep your data exactly the same, the converter puts quotes around strings that look like booleans (yes, no, on, off, true, false), null, numbers, or that start with special characters such as -, *, & or #.

Everything else is left unquoted for readability. Because JSON is a subset of YAML, the output is valid YAML that parses back to the same data.

Frequently asked questions

Is JSON valid YAML?

Almost always, yes: YAML 1.2 is a superset of JSON. Converting to YAML style simply makes it easier for people to read and edit.

Does it keep the order of keys?

Yes. Keys are written in the same order as in your JSON.

Can I convert YAML back to JSON?

This tool converts JSON to YAML only. For tidying JSON, use the JSON formatter.

Is my data uploaded?

No. The JSON is parsed and converted locally in your browser, so it is safe for configs that contain secrets.