Skip to main content
KalkuNet

JSON to YAML — Safe Conversion for Kubernetes, Docker Compose and CI

Convert JSON manifests cleanly into indented YAML configs for Docker & K8s.

Runs in your browserDeveloper · JSON, YAML, TOML, XML & CSV Converters
Indent:
  • Strings that could be misread (yes, no, on, off, null, numbers, dates) are quoted and exponents are written as 6.02e+23, so YAML 1.1 and 1.2 parsers read the same data.

When to use the JSON to Clean Indented YAML Converter

  • No yes turning into true

    Strings such as yes, no, on, off, null, 012 or 1:30 are quoted, because YAML 1.1 parsers such as PyYAML would read them as booleans, null, octal or numbers.

  • Numbers keep their value

    Decimals and big integers are written as they are. Exponents are written as 6.02e+23 with a dot and a sign, because without them YAML 1.1 reads the number as text.

  • Tidy multi-line text

    Strings with newlines are written as | literal blocks, with the right chomping indicator so trailing newlines are kept exactly.

  • Tested with PyYAML

    The output is read back with Python's yaml.safe_load and must equal the original JSON data exactly, for both 2- and 4-space indents.

Frequently asked questions

Is the key order kept?

Yes. Keys are written in the same order as in the JSON.

What about empty objects or arrays?

They are written as {} and [], the flow form that YAML accepts.

Can the output be used for Kubernetes?

Yes. A JSON manifest from kubectl get -o json can be converted and applied with kubectl apply -f.

Is my data uploaded?

No. The conversion runs in your browser.

Why are some strings quoted?

Quotes are used only when a string could be misread, such as version 1.10 being read as the number 1.1, a date turning into a date object, or text starting with a YAML special character such as #, &, * or -.

Learn more