YAML to JSON Converter

YAML 1.2 parser · Block scalars & nested sequences · Strict RFC 8259 JSON output

YAML Input
0 B
JSON Output
0 B

        
Ready
Cmd/Ctrl+Enter to run · 100% browser-local
Advertisement
Reserved fixed-height slot (CLS = 0.00) 728×90 320×100 300×50

Converting DevOps YAML Manifests to Strict JSON

While YAML dominates Kubernetes, Helm, Docker Compose, and GitHub Actions for human readability, programmatic tooling—including jq filters, REST APIs, AWS CLI inputs, and JSON Schema validators—requires strict RFC 8259 JSON. Converting YAML to JSON also surfaces subtle indentation bugs that silently nest keys under the wrong parent mapping.

Under YAML 1.2 Core Schema rules, only exact true/false literals coerce to booleans, null or ~ becomes JSON null, and quoted values remain strings. Running this conversion entirely in your browser means you can safely inspect ConfigMaps, Helm values, and CI pipeline definitions without exposing internal infrastructure topology.

  • Parser ScopeSupports mappings, nested sequences, flow syntax ({}/[]), quoted/unquoted scalars, comments, and | / > block scalars
  • Type CoercionFollows YAML 1.2 Core Schema (true/false booleans, null/~, base-10 integers and floats; keeps quoted strings as strings)
  • Output FormatsEmits 2-space pretty RFC 8259 JSON or single-line minified JSON ready for jq, curl, or JSON Schema validation
What happens to YAML comments during conversion to JSON?

RFC 8259 JSON does not support comments, so YAML # comments are cleanly stripped during parsing.

How do literal (|) and folded (>) YAML block scalars convert to JSON?

Literal blocks preserve every newline as \n inside the JSON string, while folded blocks join single line breaks into spaces while keeping blank lines.

Why did my YAML fail with an indentation error?

YAML requires consistent space indentation (never tabs) for sibling keys. Inspecting the JSON output makes misplaced nesting immediately obvious.