YAML Tools

Format and validate YAML manifests and configs, and convert between YAML and JSON. Built on the eemeli yaml library with full YAML 1.2 support and comment preservation, so Kubernetes, Docker Compose and GitHub Actions files keep their notes.

Action

About YAML Tools

YAML errors are almost always indentation errors, and they are hard to see. Formattr reports the exact line and column and explains the likely cause, such as a list item indented differently from its siblings or a tab character where spaces are required.

Multi-document files separated by --- are supported throughout; converting to JSON produces an array of documents when there is more than one.

Frequently asked questions

Are YAML comments kept when formatting?

Yes. Formatting round-trips through a document model that keeps comments. Converting to JSON drops them because JSON has no comments.

What is the Norway problem?

In YAML 1.1, unquoted NO is read as false. Formattr uses YAML 1.2, where only true and false are booleans, so country codes stay strings.

More categories