Skip to content
DevKOM

YAML Formatter

Check YAML for syntax errors, normalise its formatting, or convert between YAML and JSON. Multi-document files separated by --- are supported.

Mode
Indentation
YAML output

How to format and convert YAML

  1. Paste YAML (or JSON, for JSON to YAML) into the input.
  2. Choose the mode: Format YAML, YAML to JSON or JSON to YAML.
  3. Read any parsing error with its line and column and fix it.
  4. Copy or download the output.

Frequently asked questions

Are comments kept when formatting YAML?

Yes, Format YAML keeps comments. Converting to JSON drops them, because JSON has no comments.

Which YAML version is used?

YAML 1.2 via the open-source yaml library. Note that in YAML 1.2, values like yes/no and on/off are strings, not booleans.

What happens with multiple documents?

Format keeps each document. YAML to JSON outputs a single value for one document, or an array when the file contains several.

More in Code & Data.