Free, browser-based utilities for everyday developer workflows

Convert JSON to YAML for Kubernetes

Kubernetes and CI tools want YAML, but lots of config starts as JSON. Convert it with correct indentation and types so the manifest applies cleanly.

Open this example in JSON ↔ YAML

Open the tool, then paste the sample input below. Everything runs locally in your browser.

Open this example in JSON ↔ YAML →

The problem

You have a snippet of JSON config but the target is a Kubernetes manifest or a CI file that expects YAML. Hand-converting risks wrong indentation or turning numbers into strings. A converter gives you valid YAML with the types preserved.

Sample input

JSON
{ "apiVersion": "v1", "kind": "ConfigMap", "data": { "LOG_LEVEL": "info", "RETRIES": 3 } }

Expected output

YAML
apiVersion: v1
kind: ConfigMap
data:
  LOG_LEVEL: info
  RETRIES: 3

Indentation is two spaces, the string stays a string, and 3 stays a number — exactly what kubectl apply expects.

How to do it

  1. Paste the JSON config.
  2. Convert it to YAML.
  3. Check indentation and value types.
  4. Copy the YAML.
  5. Paste it into your manifest or CI file.

Common mistakes

  • Wrapping the whole manifest in extra quotes so numbers become strings.
  • Tabs instead of spaces — YAML requires spaces for indentation.
  • Losing the document separator when combining multiple resources.
  • Boolean-like strings such as "yes" or "no" being read as booleans.
  • Forgetting that key order in YAML is cosmetic, not semantic.

Related tools

Related guides

FAQ

How do I convert JSON config to YAML?

Paste the JSON and convert it. The tool emits YAML with two-space indentation and preserves numbers, booleans, and strings as their original types.

Will my numbers stay numbers?

Yes. A JSON number converts to a YAML number, not a quoted string, so kubectl and CI tools read the value correctly.

Can I convert a whole Kubernetes manifest?

Yes. Paste the JSON form of the resource; the output is a valid YAML manifest you can apply. For multiple resources, separate them with a --- document marker.

Why did a value like "yes" become true?

YAML treats some bare words as booleans. Quote values such as "yes" or "no" if you mean the literal string.

Is my config uploaded?

No. Conversion runs locally in your browser. Nothing is sent to a server.

JSON to YAML conversion runs locally in your browser. Nothing is uploaded.

Explore more JSON and API contract tools

Convert, format, diff, query and validate JSON and API payloads — grouped in one place.

View the JSON & API contract toolkit →