Skip to content

YAML Validator

Check that a YAML file is valid and find the exact place where it breaks.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is YAML Validator?

YAML errors are easy to make and hard to spot: a tab instead of spaces, a missing space after a colon, a sequence indented one level too much, or two identical keys in the same mapping. A validator turns these into a precise message.

This tool parses your text as YAML 1.2 (core schema) using the yaml library and reports every error with its line and column, an excerpt with a caret and a list of all problems found. Duplicate keys are treated as errors. When the YAML is valid it shows the number of documents, root type, key count, nesting depth and size. Custom tags are never executed and alias expansion is capped.

How does it work?

  1. Paste your YAML.
  2. Read the status banner: valid or invalid.
  3. For errors, follow the line and column and the caret excerpt, fix the file and watch the result update.
  4. Once valid, format it or convert it to JSON with the sibling tools.

Common use cases

  • Checking a Kubernetes manifest, Helm values file or docker-compose.yml before applying it.
  • Finding the indentation mistake that breaks a CI workflow.
  • Detecting duplicate keys that silently override each other.
  • Counting documents in a multi-document YAML stream.

Examples

Try this input in the tool above:

Input
version: "3.8"
services:
  web:
    image: nginx:1.27
    ports:
      - "8080:80"
    environment:
      - MODE=prod
  db:
    image: postgres:16
Output
Documents: 1
Root type: mapping / object
Total keys: 8
Nesting depth: 4
Size: 147 B

Privacy

YAML Validator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

This checks YAML syntax only, not the schema expected by Kubernetes, Compose or any other tool.

Frequently asked questions

Why are tabs an error?

YAML forbids tab characters for indentation. Replace them with spaces.

Are duplicate keys really errors?

The YAML specification requires keys to be unique. Many parsers silently keep the last value, which hides mistakes, so this validator reports them.

What does the document count show?

A YAML file can contain several documents separated by ---. The tool counts them all and validates each one.

More tools in JSON & Data →