YAML Formatter & Validator

Validate and format YAML online. Lint Kubernetes manifests, Docker Compose and CI files with precise error lines, multi-document support and JSON output.

Runs 100% in your browser. Nothing you paste is uploaded.

Input YAML

Output

—

About the YAML Formatter

YAML’s indentation-based syntax makes small mistakes easy and hard to spot. This YAML validator parses your document with a YAML 1.2 parser, points to the exact line and column of any error, and re-emits clean, consistently indented YAML.

Multi-document files separated by --- (common in Kubernetes) are fully supported, and you can switch the output to JSON to see exactly how a parser interprets your file.

Features

  • YAML 1.2 parsing with line & column errors
  • Multi-document (---) support
  • Normalises indentation and quoting
  • Optional key sorting
  • Output as YAML or JSON
  • Detects duplicate keys

How to use it

  1. Paste your YAML into the input pane.
  2. Choose indentation and output format.
  3. Fix any reported error and copy the cleaned-up result.

Frequently asked questions

Are comments preserved?

No. Like most YAML libraries, the parser discards comments when re-serialising. Validation does not modify your input, so you can use the tool as a pure linter.

Why does “yes” become true?

This tool follows YAML 1.2 where only true/false are booleans. If your output differs, quote the value to make it a string explicitly.

Can it validate Kubernetes resources?

It validates YAML syntax. It does not check Kubernetes API schemas, but syntax errors are by far the most common cause of kubectl apply failures.

Esc