YAML Formatter & Validator

Validate and format YAML and convert between YAML and JSON with exact error locations. Great for Docker and Kubernetes files. Free.

Output

How to use YAML Formatter & Validator

  1. Paste YAML (or JSON) or open a file.
  2. Choose Validate & format, YAML → JSON, or JSON → YAML.
  3. Copy or download the result; errors show their line number.

Privacy

Runs entirely in your browser. Nothing you enter or open here is uploaded.

Questions

Why is 12:30 kept as text?

This tool follows YAML 1.2, where 12:30 is a string. Older YAML 1.1 parsers turned it into a number (750).

Are comments kept?

No. Formatting rebuilds the YAML from its data, so comments are dropped — keep a copy of the original.

What isn't supported?

Complex keys written with “? ” and custom tags. Anchors, aliases, merge keys (<<), multi-document files and block text are supported.

Related tools