Check YAML for syntax errors and style issues

Find YAML syntax errors and style problems such as tabs, trailing spaces, and duplicate keys.

freeworks offlinenothing uploaded
ToolYAML Lint
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The YAML loader parses the document, then a style pass checks indentation consistency, tab characters, trailing spaces, duplicate keys, and document markers. Syntax errors and style findings are reported separately.

  • Spaces are required for block indentation.
  • Separating style from syntax keeps valid-but-fragile files visible.

Worked example

Valid YAML with no issues
Lint a well-formed YAML document. No warnings or errors
Input
											name: Alice
age: 30
roles:
  - admin
  - user
										
Output
												Valid: yes
Issues: none
Document count: 1
											

When to use this

Kubernetes, Ansible, and static-site repositories lint YAML before merge.

Edge cases

  • A tab in indentation is flagged even when it appears aligned.
  • Duplicate mapping keys can be accepted by some parsers but are warned here.
  • --- starts another document rather than a literal line.

References