ShuttleLab

Validate YAML Syntax Online — Free, No Sign-up

Paste your YAML below and check for syntax errors instantly. Error lines are highlighted with line and column numbers. Runs entirely in your browser — no data uploaded.

YAML 校验

What is YAML syntax validation?

YAML syntax validation checks whether a YAML document follows the rules of the YAML 1.2 specification. A valid YAML file has correct indentation, proper key-value separators, and well-formed data structures. Invalid YAML causes parse errors in tools like Kubernetes, Helm, Docker Compose, and GitHub Actions.

YAML Shuttle reports the exact line and column of each error, plus a descriptive message explaining what went wrong. The error line is highlighted in red in the line-number gutter.

When do you need to validate YAML?

  • Kubernetes deployment fails kubectl apply rejects your manifest but the error message doesn't say which line is wrong.
  • GitHub Actions won't trigger — a workflow file with indentation errors silently fails to register.
  • docker-compose reports "invalid type" — the error is generic; validation shows the exact line.
  • Helm template rendering fails values.yaml has a syntax issue that prevents chart installation.
  • CI pipeline breaks — your .gitlab-ci.yml or bitbucket-pipelines.yml has a YAML error.

How to validate YAML with YAML Shuttle

  1. Paste your YAML into the input box at the top of this page.
  2. Click “Validate”. YAML Shuttle parses the document and reports any errors.
  3. Read the error messages. Each error shows line number, column, and a description. The error line is highlighted in red.

If your YAML is valid, you'll see a green “Valid YAML” confirmation. You can then use the formatter to beautify or minify it.

Common YAML syntax errors

Tab indentation
The YAML 1.2 spec forbids tab characters for indentation. Use spaces only. Two spaces is the standard for Kubernetes and Helm charts.
Missing colon after key
Every mapping key must be followed by a colon and a space: key: value. Writing key value is invalid YAML.
Incorrect list item indentation
List items (-) under a mapping key must be indented relative to the key. A hyphen at the same level as its parent key causes a parse error.
Unquoted special characters
Values containing :, #, [, or { must be quoted. Otherwise YAML interprets them as syntax elements.
Duplicate keys
YAML 1.2 forbids duplicate mapping keys, but most parsers silently accept them and use the last value. The `yaml` library used by YAML Shuttle follows this lenient behavior — so if you have duplicate keys, validation may pass but the parsed value reflects only the last occurrence.

Frequently Asked Questions

Is the YAML validator free?
Yes. YAML Shuttle's validator is completely free with no signup or ads. The entire tool runs in your browser.
Does the validator send my YAML to a server?
No. Validation happens entirely client-side using the eemeli/yaml v2 library (npm package `yaml`). Your data never reaches our servers, making it safe for sensitive configurations like Kubernetes secrets and API keys.
What YAML version does it validate against?
YAML Shuttle validates against YAML 1.2 core specification using the eemeli/yaml v2 library (npm package `yaml`). This covers mappings, sequences, scalars, anchors, aliases, and flow style.
Does it show where the error is?
Yes. Each error includes the line number, column number, and a descriptive message. The error line is highlighted in red in the line-number gutter so you can spot it immediately.
Can it validate Kubernetes YAML?
YAML Shuttle validates YAML syntax, not Kubernetes schema. It catches indentation errors, missing colons, and malformed values. For K8s-specific schema validation, use kubectl dry-run or kubeval.

Related YAML tools