Convert Kubernetes YAML to JSON Online
Overview
Kubernetes manifests are written in YAML, but the API server stores and returns everything as JSON. When you run kubectl get deployment my-app -o json or query the Kubernetes REST API directly, you get JSON. This converter lets you paste a YAML manifest and see the equivalent JSON structure — useful for writing jq filters, debugging API responses, or building Helm chart unit tests.
How to Use This Tool
Paste your Kubernetes YAML manifest (Deployment, Service, Ingress, ConfigMap, or any other resource) into the input panel. The tool converts it to JSON with 2-space indentation. Use the copy button to grab the result, or download it as output.json.
Ready to get started? It's free, no registration required, and your files never leave your device.
PDF Tool →Frequently Asked Questions
Does this handle multi-resource YAML with --- separators?
The converter processes the first YAML document. Kubernetes manifests that bundle multiple resources with --- separators should be split first. Paste each resource separately to get individual JSON objects.
Can I use this for Helm values.yaml files?
Yes. Helm values files are standard YAML — paste them in and the converter produces equivalent JSON. This is useful for passing values to helm install via --set-json flags in newer Helm versions.
Is the converted JSON valid for the Kubernetes API?
The JSON is structurally equivalent to the YAML, but the Kubernetes API requires specific fields like apiVersion, kind, and metadata.name. The converter does not add or remove fields — it only changes the serialization format.