YAML Formatter and Validator: Check and Fix YAML

Paste YAML and get clean, correctly indented YAML, or convert it to JSON in one click.

YAML depends on indentation, so one extra space can break a config, a Kubernetes file or a CI pipeline. Finding the wrong line by eye is slow.

The YAML Formatter checks your file, shows the line of any error, and rewrites it with clean 2 or 4 space indents. You can sort keys, expand short lists into block style, or switch the output to JSON.

Everything runs in your browser, so your configuration is not uploaded.

Open the YAML Formatter

How to use the YAML Formatter: step by step

  1. Open the YAML Formatter.
  2. Paste your YAML, or upload a .yaml file.
  3. Choose YAML or JSON as the output, and the indent size.
  4. Fix any error shown, then copy or download the result.

When to use the YAML Formatter

  • Checking a Kubernetes or Docker Compose file
  • Fixing a CI pipeline config
  • Converting YAML to JSON for an app
  • Cleaning up an app config

Tip: Do not use tabs for indentation. YAML only allows spaces.