YAML Validator & Linter

Developer Tools

Paste YAML and see whether it is valid, with the line and a plain-English fix for each problem.

Checks as you type
YAML
Formatted YAML

Processed in your browser. A copy of each run is saved to your past runs so you can reopen it. Privacy

About

What the YAML Validator & Linter does

The YAML Validator checks YAML as you type and explains each problem in plain English with its line number: tabs used for indentation, misaligned keys, duplicate keys, unquoted colons and unclosed brackets. Lint warnings point out trailing spaces, odd indentation and values such as yes and no that YAML 1.1 tools read as booleans. Valid files are shown re-indented, and multi-document files are supported.

Steps

How to use it

  1. 1Paste the YAML, such as a CI workflow, a Kubernetes manifest or a config file.
  2. 2Read the problems list; fix the first error first.
  3. 3When it says Valid YAML, copy the formatted version or view it as JSON.

Example

A real run

Input

name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
⇥       - uses: actions/checkout@v4
      - run: npm test
  test:
    runs-on: macos-latest

Output

line 7 · error: Tab used for indentation. YAML only allows spaces; replace the tab with spaces.
line 9 · error: Duplicate key: this key already appears earlier in the same mapping, and YAML keeps only one value. Rename or remove one of them.

The tab (shown as ⇥) on line 7 is reported once, and the second test: key on line 9 is still caught, because the rest of the file is checked as if the tab were spaces.

Options

Every setting, and when to use it

Errors
Problems that stop a YAML parser: tabs in indentation, keys out of line, a key repeated in the same mapping, a colon inside an unquoted value, or a bracket left open. Each comes with a suggested fix.
Warnings
Valid but risky: trailing spaces, an odd number of indentation spaces, and yes, no, on and off, which YAML 1.2 reads as text but older tools, including PyYAML, read as true or false.
Formatted output
Once the file is valid, it is shown re-indented with two spaces, which also normalizes inconsistent indentation. Comments are kept.

Good to know

Common problems and limits

Up to 5 MB, checked against YAML 1.2 syntax. It checks syntax, not meaning: a Kubernetes manifest with a misspelled field name is valid YAML.

When a file contains tabs, the rest of the file is checked as if the tabs were spaces, so later problems still show.

To convert the file, use YAML to JSON; for JSON files use the JSON Validator.

Audience

Who uses it

  • DevOps engineersFind why a GitHub Actions workflow, GitLab CI file or Kubernetes manifest fails to load before pushing it.
  • DevelopersCheck docker-compose files, OpenAPI specs and app config after a hand edit.
  • Anyone editing configUnderstand a cryptic parser error from a tool by seeing the exact line and a plain explanation.

FAQ

Frequently asked

What does a YAML validator check?

That the file follows YAML syntax: consistent indentation with spaces, keys followed by a colon and a space, properly closed quotes and brackets, and no repeated keys in a mapping. It does not check that the keys and values make sense for a particular tool.

What are the most common YAML errors?

Tabs instead of spaces, keys that do not line up with their siblings, an unquoted value containing ': ' such as a title with a colon, a list item indented differently from the others, and the same key written twice. Each has its own message here.

Why is a tab not allowed in YAML?

The YAML specification forbids tabs for indentation because their width differs between editors, which would make the structure ambiguous. Configure your editor to insert spaces in .yml and .yaml files.

How do I validate a Kubernetes or GitHub Actions file?

Paste it here first to catch syntax errors. For schema checks, such as an unknown field, use kubectl apply --dry-run=server or kubeconform for Kubernetes, and the workflow editor or actionlint for GitHub Actions.

Why does yes become true in some tools?

YAML 1.1 treated yes, no, on and off as booleans, and libraries such as PyYAML still follow 1.1. YAML 1.2 dropped that rule. Quote such values, "yes", or write true and false, so every tool reads them the same way.

Is my YAML sent anywhere?

No. Validation runs in your browser. A copy of each check is saved to your past runs when you press Validate or copy the result.

Automation: an MCP tool validate_yaml(yaml) → errors and an n8n node are planned for this tool.

GuideA web developer's toolbox: timestamps, cron, permissions and headers →Unix timestamps in seconds or milliseconds, cron fields and time zones, chmod numbers, HAR files and user agents: the details web developers look up.
Built and maintained by Radhika SinghLast updated Questions: hello@operativez.ai