YAML Validator

Validate YAML syntax and catch indentation mistakes, tabs and duplicate keys before they break your Docker, Kubernetes or CI config. Errors show the line number. Runs in your browser.

Suggested tools

JSON Schema Validator

Check JSON against a JSON Schema and list every rule it breaks.

JSON
Open Tool

JSON Validator

Validate JSON and see syntax errors.

JSON
Open Tool

XML Validator

Validate XML and see errors.

XML
Open Tool

JSON5 Validator

Check JSON5 config files and see the exact error position.

JSON5
Open Tool

JSON to YAML

Convert JSON into readable YAML.

JSONYAML
Open Tool

YAML to JSON

Convert YAML into JSON.

YAMLJSON
Open Tool

About YAML Validator

YAML Validator checks YAML syntax and points to the line of the first problem. YAML is sensitive to indentation, which makes small mistakes easy to make and hard to see — a tab instead of spaces, a missing space after a colon, or a list item at the wrong level can break a Docker Compose file, a Kubernetes manifest or a CI pipeline.

Duplicate keys in the same mapping are reported as errors, because they usually mean one value silently overwrites another. Everything runs locally in your browser — the text you paste is never uploaded.

How to use YAML Validator

  1. Paste YAML or upload a .yaml / .yml file.
  2. Press Validate.
  3. Fix the reported line and validate again.

Key features

  • Line numbers for syntax errors
  • Detects tabs used for indentation
  • Reports duplicate keys
  • Supports anchors, aliases and merge keys

Example

The third line is indented one space too far.

Input
server:
  port: 8080
   host: localhost
Result
Invalid YAML: bad indentation of a mapping entry (3:8)

 1 | server:
 2 |   port: 8080
 3 |    host: localhost
------------^

When to use YAML Validator

  • Checking Docker Compose, Kubernetes or CI files before pushing them.
  • Finding the exact line of an indentation error.
  • Catching duplicate keys that silently overwrite each other.

Tips and common problems

  • Use spaces, never tabs, and keep the same indent width throughout the file.
  • Always put a space after the colon in "key: value".
  • Quote values that start with special characters such as *, & or @.

Frequently asked questions

No. YAML indentation must use spaces. Replace tabs with two spaces per level.