HohoTools

YAML to JSON Converter

This free YAML to JSON converter takes the config files humans write — Kubernetes manifests, CI pipelines, docker-compose, Home Assistant — and turns them into the JSON that scripts, jq, JSON Schema validators and programming-language tooling consume.

How to use

  1. Paste your YAML into the editor below.
  2. The formatted JSON appears instantly, with anchors and aliases already resolved.
  3. Copy the result or download it as a .json file.

Frequently asked questions

Which YAML dialect and features are supported?

Standard YAML 1.2 as implemented by the widely used yaml library: block and flow styles, quoted strings, comments (ignored), anchors and aliases (resolved), and the core scalar schema. Exotic tags such as !!set or !!omap produce structures JSON cannot express, and the tool reports them explicitly rather than guessing.

What happens to non-string mapping keys?

Scalar keys like `1: a` arrive in JSON as the string key "1" — the value is preserved, and JSON only allows string keys anyway. Keys that are whole collections (`[a, b]: x`) are stringified by the parser with a clear form, so no data is silently dropped.

What does the JSON output look like?

Pretty-printed with two-space indentation, ready to read, diff or paste into documentation. If you need compact single-line JSON or a validation report, the JSON Formatter handles re-formatting and checking from here.

How do I convert JSON back to YAML?

Use the paired JSON to YAML converter on this site — same privacy, same fail-fast error reporting, mirror-image formatting rules (block style, two-space indent, no folding).

What do the error messages contain?

For invalid YAML, the parser message is passed through verbatim, including the line and column and a snippet pointing at the problem — enough to fix a nested mapping mistake on the first try instead of bisecting the file.

Is my configuration uploaded anywhere?

No. Parsing and serialization happen entirely in your browser. Deployment manifests, secrets-referencing configs and internal definitions never leave your device.

Related tools

About this tool

This free YAML to JSON converter takes the config files humans write — Kubernetes manifests, CI pipelines, docker-compose, Home Assistant — and turns them into the JSON that scripts, jq, JSON Schema validators and programming-language tooling consume. Paste your YAML and the formatted JSON appears instantly: two-space indentation, keys in their original order, strings byte-for-byte faithful. Anchors and aliases are resolved before serialization, so a reused block appears in full everywhere it is referenced, and scalar types follow the YAML core schema: numbers stay numbers, booleans stay booleans, null stays null. Honesty is part of the deal — a YAML syntax error is reported with the exact line and column straight from the parser rather than a vague failure, and YAML-only constructs that have no lossless JSON form (such as !!set) fail loudly instead of silently degrading. The whole conversion runs locally in your browser on your own device: infrastructure definitions and private configuration never touch a network. Going the other way is a paste away with the paired JSON to YAML converter.