Skip to content

JSON to YAML Converter

Convert JSON to YAML for configuration files, Kubernetes manifests, GitHub Actions and Docker Compose. Values that YAML would misread, such as yes, no, 1e3 or 007, are quoted automatically so the result means exactly what the JSON meant.

Runs in your browserFreeNo sign-up

Processed on your device. Files and text stay in your browser and are not uploaded to our servers. How privacy works

How to use the JSON to YAML Converter

  1. Paste JSON into the input; it's validated as you type.
  2. Choose 2- or 4-space indentation to match your project.
  3. Optionally switch on Quote all strings for maximum safety.
  4. Copy the YAML or download it as data.yaml.

Features

  • Automatic quoting of ambiguous strings (booleans, null, numbers, dates, times, special characters)
  • Multi-line strings become readable block scalars
  • Arrays of objects use the compact “- key: value” layout
  • Empty objects and arrays are written as {} and []
  • 2- or 4-space indentation

Why quoting matters

YAML tries to guess types. The unquoted word no becomes the boolean false in many parsers (the famous Norway problem, since NO is Norway's country code), 007 becomes the number 7, 12:30 becomes a sexagesimal number in YAML 1.1 and 2024-01-01 becomes a date. A converter that writes strings bare can silently change your data.

This converter checks every string against those rules and quotes the risky ones, leaving ordinary text unquoted for readability. If you'd rather not think about it, Quote all strings produces YAML that is always unambiguous.

What YAML can't express from JSON

JSON and YAML are close cousins; every JSON document is valid YAML 1.2. The output here uses the block style most people write by hand. NaN and Infinity aren't valid JSON, so they can't appear; very long numbers are written as-is. Key order is preserved.

Frequently asked questions

Why are some strings quoted and others not?

Only strings that a YAML parser could misinterpret are quoted. Plain words and sentences stay unquoted for readability.

Does it support YAML comments or anchors?

No. JSON has no comments or references, so there's nothing to convert. You can add them in the output by hand.

Which YAML version is the output?

The output is valid YAML 1.2 and, thanks to conservative quoting, is also read correctly by YAML 1.1 parsers.

Is my data uploaded?

No. Conversion runs in your browser.

Other tools people use alongside JSON to YAML Converter.

You might also like

Something useful from another corner of VoltKit.