YAML Formatter
YAML, but readable. What a concept.
What this does
Paste your YAML, hit Format, get consistent indentation back. The tool parses the entire document and re-serializes it, which means it also catches structural problems. If it won't format, your YAML has issues. That's a feature, not a bug. The "To JSON" button converts your YAML to JSON in one click.
Common use cases
Normalizing config files. Docker Compose, Kubernetes manifests, CI pipelines, Ansible playbooks. One space off in YAML and a nested key becomes a sibling, or worse, the whole file breaks silently and your deployment does something creative at 2 AM.
Converting to JSON for tools or APIs that only accept it. Comparing a YAML config to a JSON payload is easier when they're in the same format.
Catching errors before they cause problems. Tabs mixed with spaces (YAML forbids tabs), missing colons, duplicate keys that most parsers quietly overwrite without telling you.
Things to know
The Norway problem. In YAML 1.1, bare NO gets interpreted as boolean false. So does off, n, and about a dozen other strings you'd never expect. Country codes, feature flags, survey answers. All quietly becoming booleans. This tool uses a YAML 1.2 parser (js-yaml), which fixes most of that. When in doubt, quote your strings.
YAML supports multiline strings in several ways (literal blocks with |, folded blocks with >, plain flow scalars) and they all behave slightly differently with trailing newlines. The formatter preserves these, but if your multiline strings look wrong after formatting, the original probably had inconsistent block indicators. YAML gives you options. Sometimes too many options.
Privacy
Everything runs client-side using js-yaml. Your Docker Compose files, Kubernetes manifests, and whatever secrets are hiding in your values files never leave your browser.