JSON & YAML

YAML Validator & Formatter

Check YAML for Kubernetes, GitHub Actions, Docker Compose, or any config. Find errors by line with plain explanations, catch values tools read differently, and tidy the indentation without changing a value.

Validate YAML locally

Runs locally in your browser. Your YAML and JSON are not uploaded, saved, or shared.
Options
0 lines

Checks as you type. Several documents separated by --- are fine.

Formatted
The formatted YAML will appear here.
Paste YAML to check it.
Ready when you are.

Watch: check and tidy YAML

No sound. Each step is captioned on screen and also written out in the guide below.

Valid YAML in three steps

  1. 01
    Paste or drop a file

    A workflow, a manifest, a compose file, or any YAML.

  2. 02
    Fix what's flagged

    Each problem shows its line and a plain explanation. Click it to jump there.

  3. 03
    Copy the tidy version

    Consistent indentation, the same values and comments.

What it catches

  • Errors: tabs, uneven indentation, duplicate keys, unquoted : in values, unclosed brackets and quotes.
  • Values tools disagree on: no or on (true/false to some tools), 0755 (octal to some), and 3.10 (the number 3.1).
  • Safety: files that expand too many aliases are refused.

Frequently asked questions

Why is "no" flagged when the file is valid?

YAML has two versions in common use. YAML 1.2 (Go, most newer tools) reads no as text; YAML 1.1 (PyYAML, Ansible, older libraries) reads it as false. That's how a country code like NO becomes false. Quoting the value means the same thing everywhere.

Will formatting change my values?

No. Numbers, booleans, and nulls keep their exact text, comments stay, and the result is checked: if formatting would change any data, the file is left as it is.

Why is python-version: 3.10 a problem?

Unquoted, 3.10 is the number 3.1, so a workflow asks for Python 3.1. Quote versions: "3.10".

Is my file uploaded?

No. Checking and formatting run in your browser, with a YAML library served from this site.