Format, beautify, and validate your YAML data
YAML (YAML Ain't Markup Language) is a human-readable data serialization format widely used for configuration files. Proper indentation is critical in YAML — this tool helps fix formatting issues and validate your YAML syntax.
YAML (YAML Ain't Markup Language) powers modern DevOps: Docker Compose, Kubernetes manifests, GitHub Actions, Ansible playbooks, and CI/CD pipelines all use YAML configuration. Its human-readable syntax is both its strength and weakness — significant whitespace means a single misplaced space can break your entire deployment. This formatter validates YAML syntax, fixes indentation, and can convert between YAML and JSON. It catches the most common YAML pitfalls: inconsistent indentation, tab characters (YAML forbids them), unquoted strings that look like booleans ('yes', 'no', 'true' become booleans), and colon-in-string issues. Format your YAML before committing to catch errors early.
YAML 1.1 interprets yes, no, on, off, true, false (case-insensitive) as booleans. This is the 'Norway problem' — country code 'NO' becomes boolean false. YAML 1.2 restricts this to only 'true' and 'false', but many parsers still use 1.1 rules. Quote strings to be safe: 'yes'.
Spaces only — YAML explicitly forbids tab characters for indentation. Most editors can be configured to insert spaces when you press Tab. Using tabs causes parser errors that can be hard to diagnose.
YAML supports comments (#), multi-line strings, references/anchors (&anchor/*alias), and has a cleaner syntax (no braces/brackets). JSON is simpler, unambiguous, and better for data interchange. YAML is a superset — valid JSON is valid YAML.
2 spaces is the most common convention (Kubernetes, Docker Compose, most tools). Some prefer 4 spaces for readability. Consistency within a file is critical. Never mix indentation levels — YAML parsers are strict about this.
Yes — this tool can convert between formats. Since YAML is a superset of JSON, the conversion is straightforward (except YAML-specific features like comments and anchors, which JSON doesn't support).