HohoTools

JSON to YAML Converter

This free JSON to YAML converter turns API payloads, config snippets and test fixtures into the indentation-based format humans prefer to edit — think Kubernetes manifests, CI pipeline files, docker-compose or Home Assistant configs that started life as JSON.

How to use

  1. Paste your JSON into the editor below.
  2. The YAML equivalent appears instantly in block style with two-space indentation.
  3. Copy the result or download it as a .yaml file.

Frequently asked questions

Why convert JSON to YAML?

Mostly configuration. Systems like Kubernetes, GitLab CI, docker-compose, GitHub Actions and Home Assistant accept JSON (YAML is a superset of it) but their docs, examples and community answers are all written in YAML. Converting a working JSON snippet gives you the same structure in the shape everyone edits by hand.

What formatting does the output use?

Block style with two-space indentation — the dominant convention in YAML config files. Line folding is disabled, so long strings stay on a single line instead of being wrapped with continuation markers, and quotes are used only where YAML requires them.

Is every JSON value representable in YAML?

Yes. YAML 1.2 is a strict superset of JSON, so objects, arrays, strings, numbers, booleans and null all map one-to-one. Your keys keep their order and your string contents survive byte for byte.

How do I convert YAML back to JSON?

With the paired YAML to JSON converter on this site — it applies the mirror-image rules and reports the exact line for invalid YAML. If you just want to re-format JSON as JSON (pretty or minified), use the JSON Formatter instead.

What happens if my JSON is invalid?

You get an explicit error with the line and column of the problem, straight from the parser. Nothing is silently repaired or best-effort guessed — a config that converts here converts because it actually parses.

Does my data leave the browser?

No. The conversion is done by JavaScript running on your device. JSON pasted from internal APIs, infrastructure code or private configuration is never uploaded, stored or logged.

Related tools

About this tool

This free JSON to YAML converter turns API payloads, config snippets and test fixtures into the indentation-based format humans prefer to edit — think Kubernetes manifests, CI pipeline files, docker-compose or Home Assistant configs that started life as JSON. Paste your JSON and the YAML appears instantly as you type: block style throughout, two-space indentation, and no automatic line folding, so long strings stay on one line and copy-paste survives intact. Keys keep their order, strings keep their exact content, and the output is a faithful re-expression of the parsed value — nothing is sorted, quoted or re-formatted behind your back. If the input is not valid JSON, the tool fails loudly with the exact line and column of the problem instead of producing a plausible-looking guess, so a broken payload can never quietly become a subtly different config. The conversion runs entirely in your browser on your own device: JSON from internal APIs, infrastructure definitions or private config never touches a network. Need to go the other direction? The paired YAML to JSON converter reverses the trip with the same care.