jarvisbox

Convert Kubernetes JSON Config to YAML

Kubernetes manifests are almost always written and maintained in YAML, but tooling like kubectl get -o json, Helm templating, and CI pipelines often produce JSON output. Converting that JSON back to YAML should be straightforward — but most online tools sort object keys alphabetically, which reorders apiVersion, kind, metadata, and spec into a non-standard order that confuses reviewers and breaks conventions.

This tool converts Kubernetes JSON manifests to YAML while preserving the original field insertion order. apiVersion comes first, kind second, metadata third, spec fourth — exactly as Kubernetes convention dictates. The conversion runs entirely in your browser: no JSON is uploaded, no API key is required.

For multi-document streams, paste the JSON array output from kubectl get -o json (the List wrapper) and the tool converts each item. Nested objects like spec.template.spec.containers are handled recursively, with all nested field orders preserved as well.

Open JSON to YAML Converter →

How to use

  1. Paste your JSON object or array into the JSON input area.
  2. Leave Sort keys alphabetically unchecked to preserve insertion order (default), or enable it for canonical output.
  3. Click JSON → YAML to convert, then Copy or Download the result.

Related tools

反馈这个工具的问题