YAML Validator & Linter

Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.

Runs in your browserUpdated
Open file

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the YAML Validator

  1. Paste YAML or open a .yml / .yaml file.
  2. Errors show the line, column and a pointer to the exact spot.
  3. Review the lint warnings for tabs, trailing spaces and YAML 1.1 pitfalls.
  4. Copy the formatted YAML or the JSON equivalent.

Why YAML breaks so easily

YAML uses indentation for structure, so a single misplaced space changes the meaning or makes the file invalid. The most common errors:

ErrorCause
bad indentation of a mapping entryA key is indented differently from its siblings
found a tab characterYAML forbids tabs for indentation — use spaces
duplicated mapping keyThe same key appears twice in one object; most parsers silently keep the last one
incomplete explicit mapping pair / unexpected endAn unclosed quote, bracket or a colon inside an unquoted string
end of the stream or a document separator is expectedContent at the wrong indentation after a list or block

YAML 1.1 vs 1.2 gotchas

Many tools (PyYAML, older Ruby and Go libraries) still follow YAML 1.1, where yes, no, on, off are booleans and 012 is octal — the famous “Norway problem” where the country code NO becomes false. YAML 1.2 treats these as strings. The linter flags such values so you can quote them and get the same result everywhere.

Multi-document files

Kubernetes manifests often combine several resources separated by ---. Each document is validated and shown in the JSON output as an array.

Validating meaning, not just syntax

Valid YAML can still be a wrong configuration. For structure checks against a schema, convert to JSON and use the JSON Schema validator; for API specs, the OpenAPI validator. Build new files with the Docker Compose generator or GitHub Actions generator, and convert formats with YAML to JSON.

Tools that pair well with the YAML Validator

  • .gitignore Generator — Tick your stack — Node, Python, React, Next.js, Docker, macOS, VS Code and 40 more — and get one clean, de-duplicated .gitignore with commented sections, ready to download.
  • Git Command Generator — Pick a task like “undo the last commit but keep my changes” or “rename a branch on GitHub”, fill in your branch names and get the exact Git commands — each line explained, risky steps flagged.
  • package.json Generator — Fill in a form and get a valid package.json — npm name validation, script presets for Vite, Next.js, Node and TypeScript libraries, exports, engines, license and repository — with warnings for common mistakes.
  • .env File Validator — Paste a .env file to find invalid keys, duplicates, empty values and quoting mistakes, compare it with .env.example to spot missing variables, and generate a safe example file.

Frequently asked questions

Why does my YAML say “bad indentation”?
A key or list item is indented with a different number of spaces than its siblings. Align it with the other entries at the same level; the pointer shows the column.
Can YAML use tabs?
No. The YAML specification forbids tabs for indentation. Replace them with spaces (2 is the common convention).
Does it validate Kubernetes or Docker Compose rules?
It checks YAML syntax and common pitfalls, not the meaning of each field. Use the tool’s JSON output with a JSON Schema for structural validation.
Is my YAML uploaded?
No. Everything runs in your browser.

Related tools