YAML Validator
Check that a YAML file is valid and find the exact place where it breaks.
Processed locally in your browser· Your data stays in your browser.
What is YAML Validator?
YAML errors are easy to make and hard to spot: a tab instead of spaces, a missing space after a colon, a sequence indented one level too much, or two identical keys in the same mapping. A validator turns these into a precise message.
This tool parses your text as YAML 1.2 (core schema) using the yaml library and reports every error with its line and column, an excerpt with a caret and a list of all problems found. Duplicate keys are treated as errors. When the YAML is valid it shows the number of documents, root type, key count, nesting depth and size. Custom tags are never executed and alias expansion is capped.
How does it work?
- Paste your YAML.
- Read the status banner: valid or invalid.
- For errors, follow the line and column and the caret excerpt, fix the file and watch the result update.
- Once valid, format it or convert it to JSON with the sibling tools.
Common use cases
- Checking a Kubernetes manifest, Helm values file or docker-compose.yml before applying it.
- Finding the indentation mistake that breaks a CI workflow.
- Detecting duplicate keys that silently override each other.
- Counting documents in a multi-document YAML stream.
Examples
Try this input in the tool above:
version: "3.8"
services:
web:
image: nginx:1.27
ports:
- "8080:80"
environment:
- MODE=prod
db:
image: postgres:16
Documents: 1 Root type: mapping / object Total keys: 8 Nesting depth: 4 Size: 147 B
Privacy
YAML Validator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
This checks YAML syntax only, not the schema expected by Kubernetes, Compose or any other tool.
Frequently asked questions
Why are tabs an error?
YAML forbids tab characters for indentation. Replace them with spaces.
Are duplicate keys really errors?
The YAML specification requires keys to be unique. Many parsers silently keep the last value, which hides mistakes, so this validator reports them.
What does the document count show?
A YAML file can contain several documents separated by ---. The tool counts them all and validates each one.
Related tools
YAML Formatter & Beautifier
Re-indent and normalise a YAML file while keeping comments, anchors and multi-document structure.
JSON & Data
YAML to JSON Converter
Turn YAML into strict JSON, resolving anchors, aliases and merge keys along the way.
JSON & Data
JSON to YAML Converter
Turn JSON into readable block-style YAML, with strings quoted only when necessary.
JSON & Data
JSON Validator
Check whether a piece of text is valid JSON and locate the exact character where it goes wrong.
JSON & Data
XML Validator
Find out whether your XML is well-formed and see precisely where it breaks.
JSON & Data
JSON Repair
Paste almost-JSON from a log, a chat answer or a JavaScript snippet and get valid JSON back, with a clear report of every change.
JSON & Data