Convert JSON to Kubernetes YAML Online — No kubectl Install Required
- Paste your Kubernetes JSON manifest, click Convert, get valid YAML with 2-space indentation — ready to kubectl apply.
- Works for Deployments, Services, ConfigMaps, Ingress, StatefulSets, and any other K8s resource.
- No kubectl required. No cluster access. The conversion runs entirely in your browser.
Table of Contents
Kubernetes accepts both JSON and YAML manifests, but YAML is the convention for anything checked into Git or shared across a team. If you have a JSON manifest — maybe exported from kubectl get -o json, generated by a tool, or built programmatically — converting it to clean YAML in your browser takes one paste. No kubectl install, no Python script, no cluster access. This guide walks through the workflow for Deployments, Services, and ConfigMaps with the exact output shape.
The Paste-and-Click Flow for a Deployment
Take a JSON Deployment (from kubectl get deployment nginx -o json or hand-written):
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"name":"nginx"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.25","ports":[{"containerPort":80}]}]}}}}
Paste into the JSON to YAML converter. Click Convert. Output:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.25
ports:
- containerPort: 80
Save as nginx-deployment.yaml, run kubectl apply -f nginx-deployment.yaml. That's the whole flow.
Why Engineers Convert K8s JSON to YAML in the First Place
Three common scenarios drive this conversion:
- Exported from a running cluster. You ran
kubectl get -o jsonto capture live config and want to commit it to Git as YAML. - Generated from a tool. Terraform's
kubernetes_manifest, Pulumi, or CDK8s output JSON you'd rather read as YAML. - Migrated from Helm values. Helm values.json needs to become values.yaml for a chart override.
In every case, the conversion is one-way mechanical — no logic changes, just the format. That's exactly what a browser converter is built for.
Sell Custom Apparel — We Handle Printing & Free ShippingConfigMaps and Secrets — a Quick Win
ConfigMaps often have big data blocks with multi-line strings. YAML's block scalars (| for literal, > for folded) make those readable. JSON forces \n escapes.
Paste the JSON, convert, and you get YAML where long strings use block scalars automatically. Your 500-line config file becomes 100 lines of readable YAML.
Note: our converter passes lineWidth: -1 to the YAML engine, meaning no line wrapping. Long string values stay on one line. If you want wrapping, hand-edit after — a text editor with word-wrap is the simplest way.
Edge Cases — Quoting, Dates, and the Norway Problem
YAML has infamous quirks. The converter handles most automatically:
- Norway problem: a JSON string "NO" could be interpreted as boolean false in old YAML 1.1 parsers. Modern YAML 1.2 (what Kubernetes uses) avoids this, and the converter emits strings with proper quoting when needed.
- Dates: ISO date strings in JSON stay as strings in YAML, not auto-parsed as timestamps. Kubernetes doesn't use timestamp types in manifests, so this matches what you want.
- Numbers as strings: a JSON
"replicas": "3"(string) stays quoted in YAML. Kubernetes expectsreplicas: 3(integer). Fix the JSON before converting if types are wrong. - Boolean strings: JSON
"enabled": "true"stays as a quoted string. Usually what K8s wants, but double-check if a field expects a boolean.
Always validate with kubectl apply --dry-run=client -f file.yaml before applying for real.
When to Use kubectl Convert or yq Instead
For automation or big batches:
- kubectl get -o yaml — skips the JSON step entirely. Go straight from cluster to YAML.
- yq eval -P --output-format=yaml — reads JSON, emits YAML. Great for shell pipelines.
- kubectl convert — specifically for converting between API versions (v1beta1 to v1). Not just a format converter.
For one-off manual conversions during manifest editing, a browser tab is faster than any of those. See our no-CLI guide for more context.
Convert Your K8s Manifest in One Click
Paste the JSON, click Convert, save as .yaml. Ready for kubectl apply. No install, no upload.
Open Free JSON to YAML ConverterFrequently Asked Questions
Does the converter produce valid Kubernetes YAML?
Yes — it outputs YAML 1.2 with 2-space indentation, which is what kubectl expects. Always dry-run with kubectl apply --dry-run=client -f file.yaml before applying to a real cluster.
Can I convert kubeconfig JSON to YAML?
Yes — kubeconfig is just JSON or YAML, and the conversion is lossless. Paste the JSON, convert, and save. Keep in mind kubeconfig contains credentials — use a local-only converter (ours runs entirely in your browser, nothing uploaded).
Why does my converted YAML have quotes around some values?
The YAML engine quotes values when they could be ambiguous — strings that look like booleans ("yes", "no"), strings that start with special characters, or numbers stored as strings in the source JSON. Quoting is safe and always valid.
Does the converter handle multi-document JSON (multiple Kubernetes objects)?
The converter takes one JSON value at a time. For a multi-document YAML (separated by ---), convert each JSON object separately and join them with --- between. Most tools that emit multiple resources emit a JSON array; unwrap it and convert each element.

