YAML Validator
Check your YAML for syntax errors in a second. Paste or upload a .yaml or .yml file and the validator points to the exact line and column that is wrong, explains what the parser found, and flags risky patterns even when the file is technically valid. Everything runs in your browser, so your configuration never leaves your device.
Drop your YAML file here
or
Supports .yaml and .yml files up to 2 MB, processed entirely on your device
Validation result
Your validation result will appear here. Paste YAML or upload a file to get started.
What to expect
- Pinpoints the line and column of the first syntax error, with a code excerpt.
- Explains common parser messages in plain language and suggests a fix.
- Shows document, key and nesting statistics for valid files.
- Warns about trailing spaces, tabs, YAML 1.1 booleans and leading-zero numbers.
How to use it
- 1
Add your YAML
Paste it into the editor, or drag in a .yaml or .yml file.
- 2
Read the result
Validation runs as you type. A valid file shows its statistics; an invalid one shows where and why it fails.
- 3
Fix and re-check
Use Go to line to jump straight to the problem, fix it, and watch the result update immediately.
Common YAML errors and what the validator says
These are the mistakes that cause most broken YAML files. Each message below was produced by this validator, so you will see exactly the same text when you hit the problem yourself.
Tabs used for indentation
YAML forbids tab characters in indentation, but editors insert them silently. Replace each tab with spaces; two spaces per level is the most common convention.
server:
<TAB>host: localhostLine 2, column 1
tab characters must not be used in indentationInconsistent indentation
Sibling keys must start in the same column. Here port is indented one space further than host, so the parser cannot decide where it belongs.
server:
host: localhost
port: 8080Line 3, column 8
bad indentation of a mapping entryUnquoted colon inside a value
A colon followed by a space starts a new key. If a value contains one, wrap the whole value in quotes: title: "Note: remember this".
title: Note: remember thisLine 1, column 12
bad indentation of a mapping entryUnclosed bracket or quote
An inline list that is never closed swallows the lines after it. Add the missing ] and the structure is restored.
tags: [web, cli
name: demoLine 2, column 1
deficient indentationDuplicate key
Defining the same key twice at one level is an error in strict parsers, because one value would silently overwrite the other. Rename or remove one.
name: demo
name: otherLine 2, column 1
duplicated mapping keyMixing a list and a mapping
A block is either a list (items starting with a dash) or a mapping (key: value pairs), never both at the same level. Indent the mapping under a key, or turn the list into a value.
- web
- cli
name: demoLine 3, column 1
end of the stream or a document separator is expectedWhy valid YAML can still cause bugs
Passing a syntax check does not guarantee that every tool will read your file the way you intended. YAML has two widely used versions, 1.1 and 1.2, and they disagree about some plain values. Under YAML 1.1, which PyYAML and several other libraries still follow, the unquoted words yes, no, on and off are booleans. A country code written as no (for Norway) quietly becomes false.
A number with a leading zero, such as 0123, is read as octal by YAML 1.1 parsers, which changes its value. The validator flags both patterns as warnings. They do not make the file invalid, but if you quote the value you get the same result in every parser.
The warnings also cover plain housekeeping problems: trailing whitespace that creates noisy diffs, tab characters that hide in indentation, and a missing newline at the end of the file.
How the validator works
Validation uses the js-yaml parser, running locally in your browser tab. It reads the entire file, including multi-document streams separated by ---, and reports the first problem it meets. Parsers stop at the first syntax error because everything after it depends on a structure that could not be understood, so fix that error first and the next one, if any, will appear.
Because nothing is uploaded, the tool is safe to use with configuration that contains hostnames, internal URLs or other details you would rather not paste into an online service. Closing the tab discards everything.
Where a YAML validator helps
Kubernetes and Helm
Catch an indentation slip in a manifest before kubectl rejects it.
GitHub Actions and CI
Check workflow files so a typo does not waste a pipeline run.
Docker Compose
Confirm that services and volumes are nested correctly.
OpenAPI and config files
Verify long specs and application settings that are edited by hand.
YAML Validator FAQ
How do I validate a YAML file online?
Paste your YAML into the editor or upload a .yaml or .yml file. The validator checks it immediately and shows either the statistics for a valid file or the line, column and cause of the first error.
Is my YAML uploaded to a server?
No. Parsing happens entirely in your browser using JavaScript. Nothing you paste or upload is sent anywhere or stored.
Why does it only show one error?
A YAML parser stops at the first syntax error, because the rest of the file depends on a structure that could not be understood. Fix the reported error and the validator will show the next one if there is one.
What is the difference between an error and a warning?
An error means the file is not valid YAML and cannot be parsed. A warning means the file is valid but contains something that often causes problems, such as an unquoted yes or trailing whitespace.
Does it check Kubernetes, GitHub Actions or OpenAPI schemas?
No. The validator checks YAML syntax and structure only. It confirms the file is well-formed, but it does not know whether the keys and values are correct for a particular tool. Use that tool's own schema validation for that.
Can it validate YAML with several documents?
Yes. Files with multiple documents separated by --- lines are supported, and the result reports how many documents were found.
Is there a file size limit?
Files up to 2 MB can be validated. That is far larger than almost any configuration file, and it keeps the editor responsive.