Skip to content

YAML Validator and Formatter

Check YAML for mistakes and format it, with errors shown by line.

Paste YAML on the left, or try a sample. It is checked as you type.

Input
Formatted

Your YAML is checked in your browser and never sent to a server.

About this YAML validator

Check YAML files such as Docker Compose, Kubernetes, GitHub Actions and app config for mistakes, and format them with a consistent indent. Errors are shown with their line, comments are kept, files with several documents separated by --- work, and duplicate keys are flagged. Everything runs in your browser.

How to use it

  1. Paste YAML, upload a file or try a sample.
  2. Read the result: valid, or the line and reason of the first mistake.
  3. Choose Go to error to jump to the line, and fix it in the editor.
  4. Copy or download the formatted YAML.

Frequently asked questions

Is my YAML uploaded?

No. Config files often hold secrets, so the YAML is checked in your browser and never sent anywhere.

Why is a tab an error?

YAML does not allow tabs for indentation. Replace them with spaces; two spaces per level is usual.

Why are duplicate keys only a warning?

The YAML specification forbids them, but many tools quietly keep the last value. That usually hides a mistake, so the validator points them out without refusing the file.

Which YAML version is used?

YAML 1.2, the current version. Values such as yes and no are text in 1.2; older 1.1 tools read them as true and false.