YAML formatter

Validate and format YAML, or convert it to JSON.

  • Development
  • 100% free & unlimited
  • No sign-up
  • Runs in your browser
YAML formatter

What is the yaml formatter?

The YAML formatter validates YAML – Docker Compose, Kubernetes, GitHub Actions or any config file – and rewrites it with consistent indentation. Errors are reported with their line and column, the classic tab and indentation mistakes included.

Switch the output to JSON to convert YAML to JSON. Files with several documents separated by --- are supported.

How to use the yaml formatter

  1. 1Paste YAML into the editor.
  2. 2Choose formatted YAML or JSON, and the indentation.
  3. 3Copy or download the result.

Features

Syntax validation

Line and column of syntax errors.

Formatting

2 or 4 spaces, consistent quoting.

YAML to JSON

Convert in one click.

Multi-document

Handles files with --- separators.

Frequently asked questions

Why can't YAML use tabs?

The YAML specification only allows spaces for indentation.

Are comments kept?

No, formatting rebuilds the YAML from its data, so comments are removed.

Is my YAML uploaded?

No, it's parsed in your browser.