Skip to content

YAML validator

Checks whether the YAML parses. The text in the editor is not rewritten.

Ctrl+Enter or ⌘+Enter runs this tool immediately.

YAML to check

Waiting for input.

Parsing stays in this browser. Input is not uploaded or saved.

How to use this tool

  1. Paste the YAML you want to check, or load the workflow sample.
  2. Read the validation panel. Valid and invalid states use different wording, and errors name a line and column when available.
  3. Fix the source yourself. Clear starts over. Sample replaces the editor with a known-valid document only when you ask it to.

Supported formats and limitations

  • This checks syntax against the YAML 1.2 core schema. It does not know whether the document matches a particular application's schema.
  • Duplicate keys are errors. The validator will not silently keep the last one.
  • A file of only comments has no document value. That is reported as valid YAML with no value, not as a repaired document.
  • The input is never rewritten, formatted, or auto-corrected.

Examples

A valid mapping

A top-level mapping of two keys is valid. The summary counts keys and does not list them.

image: app:1.4
replicas: 2

A document that should fail

An unclosed flow sequence is invalid. The panel reports the location and leaves the text in the editor.

steps: [build, test

Common errors and solutions

Nested mappings are not allowed in compact mappings
Break the nested mapping onto its own indented line instead of putting it beside the parent key.
Unresolved alias
Define the anchor before the alias, or remove the alias. The validator does not invent the missing anchor.
Flow sequence must end with a ]
Close the bracket, or switch the sequence to block style with dashes.

FAQ

Does valid mean my app will accept the file?
No. Valid means the YAML syntax parsed. Required keys, types, and product-specific rules are outside this tool.
Will it fix my indentation?
No. The input stays as you typed it. Use the error location to edit it yourself.
Is the document sent anywhere to be checked?
No. Validation runs in your browser on the text in the editor.

Read next

Related tools

  • Kubernetes YAML syntax check

    Check the YAML syntax of a Kubernetes manifest, including files with more than one document. This does not check apiVersion, required fields, or unknown kinds.

  • YAML to JSON converter

    Convert YAML configuration to readable or compact JSON in the browser. Comments are dropped, and parse errors include line and column when the parser reports them.

  • JSON to YAML converter

    Convert valid JSON into YAML with 2-space or 4-space indentation. Nested objects, arrays, and multiline strings are preserved, and invalid JSON is reported instead of repaired.