Syntax and indentation
Tabs, misaligned keys, unclosed quotes and brackets are reported with the exact line and column.
Paste YAML to check its syntax, pinpoint errors and get clean, consistently formatted output.
Each line of the output, in default formatting, next to the path of the value it holds. Click a row to copy the path.
Runs entirely in your browser, so nothing is uploaded. Fair-use limits apply (5 MB per input, rate-limited conversions) to prevent spam and bots.
Mixed indentation, inline maps and unnecessary quotes all parse fine but are hard to review. The formatted output gives every file the same shape.
services:
web:
image: "nginx:1.27"
ports: [ "80:80" ]
environment: {LOG_LEVEL: info, DEBUG: 'false'} services:
web:
image: nginx:1.27
ports:
- '80:80'
environment:
LOG_LEVEL: info
DEBUG: 'false' These are the messages you will see most often, in this validator and in tools like kubectl, Helm and docker compose.
| Error message | What it means and how to fix it |
|---|---|
tab characters must not be used in indentation | YAML allows only spaces for indentation. Replace each tab with spaces. |
bad indentation of a mapping entry | A key is indented differently from its siblings, or a plain value contains ": ". Line the key up with its neighbours, or quote the value. |
mapping values are not allowed in this context | The same problem as reported by kubectl and Helm: usually an unquoted value containing ": ", such as a URL or a time. Quote the value. |
end of the stream or a document separator is expected | A list item or key sits at the wrong indentation level, for example a list followed by a mapping at the same level. |
unexpected end of the stream within a flow collection | An inline list [ … ] or map { … } is never closed. Add the missing bracket. |
duplicated mapping key | The same key appears twice in one mapping. Remove or rename one of them. |
unidentified alias | An alias such as *defaults is used before, or without, its anchor &defaults. |
Break the file on purpose with the buttons and watch which check catches it.
Tabs, misaligned keys, unclosed quotes and brackets are reported with the exact line and column.
A key defined twice in the same mapping is an error, where some parsers silently keep the last value.
Every alias must point to an anchor defined earlier in the document, and merge keys must reference mappings.
Each document in a --- separated file is parsed, and the notes show how many were found.
Validation runs in your browser, so secrets in CI files and manifests never leave your machine.
Valid YAML converts to JSON in one click with the YAML to JSON converter.
Converters, validators and step-by-step guides for every place JSON and YAML meet.
Paste your YAML or drop a .yaml or .yml file. The badge shows Valid YAML or Invalid YAML as you type. For an invalid file you get the error message with the exact line and column, and the line is highlighted in the editor.
It re-writes the same data with consistent indentation and quoting: block style, your chosen indent, and quotes only where needed. It is a quick way to normalize a file before committing it.
No. The validator parses the YAML into data and writes it out again, and comments are not part of the data. Use the output to check structure, and keep your original file if its comments matter.
Yes. Documents separated by --- are each checked, and the formatted output keeps them as separate documents. The notes under the editor show how many documents were found.
It checks YAML syntax, not a specific schema. A file can be valid YAML and still be rejected by kubectl or docker compose for an unknown field. Use kubectl apply --dry-run=server or docker compose config for schema checks.
Parsing follows the YAML 1.2 core schema, so yes, no, on and off stay strings. With "YAML 1.1 safe" on, the output quotes those words, so older parsers such as PyYAML read them as strings too.