YAML Validator

Validate YAML syntax and report line/column of errors.

The YAML Validator checks whether text is well-formed YAML. It shows either a Valid YAML message with the number of documents or a list of errors with line and column positions. It checks syntax only, not whether the data suits a particular application.

What does YAML validation check?

Validation parses the text according to the YAML specification and reports whether it is syntactically correct. YAML relies on indentation to express structure, so common problems are tabs used as indentation, inconsistent indentation, unclosed quotes or brackets, a mapping value on the same line as another key, and duplicate keys in a mapping. A valid result means a parser can read the document into data. It does not mean the data is right for your use: a Kubernetes manifest or CI file can be perfectly valid YAML and still contain a wrong field name. For that you need a schema or the application's own checks. Reported positions show where the parser noticed the problem, which is often at or just after the real mistake.

How to use YAML Validator

  1. Paste YAML Enter the YAML in the YAML pane. Until you do, the tool shows Paste YAML above to validate it.
  2. Read the status A green message says Valid YAML with the number of documents. A red box says Invalid YAML with the number of errors.
  3. Review the list Each error is listed with its line and column, for example Line 2, column 1.
  4. Fix and recheck Correct the first error and the result updates immediately.

Frequently asked questions

Does valid mean my config is correct?

No. It means the syntax is correct. The application or a schema decides whether the fields are right.

Why is the error on a different line than the mistake?

The parser reports where it noticed the problem, which can be after the real cause.

Is JSON valid YAML?

Yes. YAML 1.2 is designed so that JSON documents are valid YAML.

Does it validate multiple documents?

Yes. All --- separated documents are parsed, errors from any of them are listed, and a valid result reports the document count.

Are comments allowed?

Yes, starting with #. A # inside a quoted string is part of the string.

Is my data uploaded?

No. The conversion runs in the page and the text you enter is not sent anywhere.