YAML validator
Check YAML structure, nesting and safe-subset compatibility locally.
How it works & useful details
What validation covers
This is a structural check for the same safe YAML data subset used by the converter: two-space maps/lists, comments, quoted/plain scalars, booleans, null and finite safe numbers. It reports the first clear line-level issue it finds.
It is not a complete YAML implementation or a deployment/security certificate. Unsupported advanced YAML is reported explicitly instead of being reinterpreted.
Private, bounded processing
This workspace parses text only in your browser. It never opens links, requests external entities, runs pasted configuration, or saves your document. Input is limited to 500,000 characters; conversion output is limited to 1,000,000 characters.
About this tool
YAML validator checks structure, indentation, and nesting in pasted YAML, and flags constructs outside the safe subset the other littlekit YAML tools support. It is a quick way to catch a broken manifest before it reaches a pipeline.
Validation happens locally, and the document is never executed or resolved. Errors are reported with line references so you can jump straight to the problem.
How to use it
- Paste the YAML document.
- Validate to see structural errors and unsupported constructs.
- Fix the reported lines in your file and validate again.
- Export the report if you need it for a review.
Worked examples
services:
web:
image: nginx
ports:
- 80fails with "Line 4: Indentation uses multiples of two spaces." The ports key is indented three spaces instead of four, a typo that is easy to miss by eye and that changes the meaning of the file in YAML.
base: &base
a: 1
child:
<<: *baseis reported as unsupported on line 1, because anchors and aliases are outside the safe subset. The validator says so explicitly rather than calling the file invalid YAML.
What validation does and does not tell you
The validator checks structure: consistent two-space nesting, well-formed keys and list items, and valid scalars. It reports the first clear problem with its line number. A valid result means the file can be read as data by this subset. It does not confirm that the content is correct for Kubernetes, Docker Compose, or your CI system, which each have their own schemas. Use their own linting tools, such as docker compose config or kubectl apply --dry-run, as a second step.
Tabs are not allowed for indentation in YAML at all, and mixing them with spaces is a common cause of confusing errors after copying from an editor or a chat message.
Frequently asked questions
Is this a full YAML specification validator?
It checks the safe, documented subset this platform supports and flags anything else instead of silently accepting it.
Can it fix my YAML automatically?
No. It reports problems; you make the edits in your own file.
What is the limit?
Up to 500,000 characters of YAML text.
Does it validate against a schema?
No. It is a structural check. For Docker Compose files specifically, try the Docker Compose validator in the DevOps tools.
