Skip to content

Convert JSON to YAML

Convert a JSON object to YAML, a more readable format commonly used in configuration files.

Processed on your device. Nothing is sent to any server.

Walks the JSON object and serializes it into the equivalent YAML syntax, using a safe schema that only produces basic data types.

Use cases

  • Converting a JSON configuration to YAML for Kubernetes or Docker Compose.
  • Preparing a more readable configuration file from JSON data.
  • Migrating configuration from JSON to YAML.

How it works

  1. 1

    Paste your JSON

    Type or paste the JSON object into the input box.

  2. 2

    Convert it

    Click Convert and copy or download the resulting YAML.

Technical details

  • Strings YAML could mistake for another type are quoted: the text "123" comes out as '123' so it isn't read as a number.
  • Indentation is 2 spaces and lists use dashes.
  • It adds no comments and doesn't rename keys; converting the result back with the YAML to JSON tool gives the same JSON.

Frequently asked questions

Does it preserve key order?

Yes, the order of properties in the original JSON object is preserved in the generated YAML.

← Data