YAML Formatter and Validator

Validate and reformat YAML, and convert between YAML and JSON.

Runs in your browser. Your input is processed on your device and is not uploaded to our server.

How to use the YAML Formatter and Validator

  1. Paste YAML (or JSON to convert).
  2. Click Format YAML, YAML → JSON or JSON → YAML.
  3. Fix any reported errors and copy the result.

The built-in parser supports the YAML used in most configuration files: nested mappings and sequences, plain and quoted strings, numbers, booleans, null, comments, flow collections like [a, b] and {a: 1}, multi-document separators and block scalars (| and >). Anchors, aliases and custom tags are reported as unsupported rather than silently mis-parsed. Formatting normalises indentation to two spaces and removes comments.

Frequently asked questions

Why are “yes” and “no” kept as strings?
The parser follows YAML 1.2, where only true and false are booleans. In YAML 1.1, yes/no/on/off were booleans too.