DevFormatter

YAML Validator

Instantly check YAML syntax for errors — shows exact line and column, and warns about YAML 1.1 coercion risks.

Our YAML Formatter includes a full YAML validator — paste your YAML and it instantly checks syntax, highlights errors, and warns about YAML 1.1 coercion risks.
Open YAML Validator →

What is a YAML Validator?

A YAML validator checks whether a YAML document conforms to the YAML specification. It verifies correct indentation (spaces only — tabs are forbidden), properly formed mappings and sequences, valid scalar types, and no structural errors.

Beyond basic syntax, the YAML Formatter also detects YAML 1.1 coercion risks — values that older parsers (PyYAML, Docker Compose, GitHub Actions) silently misinterpret. For example, a bare yes is treated as true by YAML 1.1 parsers but kept as the string "yes" by YAML 1.2 parsers like js-yaml v5.

All validation runs in your browser using js-yaml v5 (YAML 1.2 Core schema). No data is sent to any server.

Frequently Asked Questions

What is a YAML validator?
A YAML validator checks whether a YAML document follows the YAML specification — correct indentation (spaces only, no tabs), properly formed mappings and sequences, valid scalar types, and no structural errors. It reports the exact line and column of any syntax error.
What are the most common YAML errors?
Tab characters used for indentation (YAML requires spaces), inconsistent indentation levels, missing colons after mapping keys, and duplicate keys. The most subtle errors come from YAML 1.1 parsers silently converting bare values like yes, no, on, off to booleans.
What are YAML 1.1 coercion risks?
YAML 1.1 parsers (PyYAML, Docker Compose using go-yaml v2, GitHub Actions) silently convert bare yes, no, on, off to booleans, time values like 22:30 to integers (1350), and dates like 2024-01-15 to Date objects. YAML 1.2 parsers (js-yaml v5+, go-yaml v3) do not. The YAML Formatter's Fix YAML 1.1 Risks button auto-quotes these values.
Is my YAML data sent to a server?
No. All validation runs entirely in your browser using js-yaml v5. Your data never leaves your machine.
What is the difference between YAML validation and JSON Schema validation?
YAML validation checks that the document is syntactically correct YAML. To validate YAML data against a schema (required fields, types, constraints), convert it to JSON first and use a JSON Schema validator like Ajv.

Related Tools

Other free developer tools available on DevFormatter.