Part of Code & data tools
YAML formatter: fix indentation for configs and CI files
Processing stays in your browser. Paste from a repo, cloud console, or incident ticket, then copy the cleaned file back.
How to use this converter
- Paste YAML from Helm values, Docker Compose, or CI pipelines.
- Format to align lists, maps, and nested keys.
- Review colon spacing and quote rules for strings with special characters.
- Copy into your editor or deployment command.
Why whitespace matters in YAML
Unlike JSON, YAML forbids tabs in many parsers and treats indentation depth as syntax. Mixing two-space and four-space indents in one file is a common source of “did not find expected key” errors.
Formatting does not change values—it reveals structure. Strings that look like numbers or booleans may still need quotes after you inspect them.
Kubernetes, Compose, and GitHub Actions
Platform engineers tidy Helm charts and Kustomize patches here before review. Developers clean `.yml` configs copied from Slack or email where indentation was destroyed.
For secrets, redact tokens before pasting—even though processing is local, screen sharing and ticket systems are not private vaults.
When to use YAML vs JSON
YAML is human-friendly for ops configs; JSON is stricter for APIs. Convert between them on dedicated tool pages rather than hand-editing across formats without validation.
Before and after examples
| Original | Converted | Notes |
|---|---|---|
| services: web: image: nginx | Consistent two-space nesting | Compose-style map |
| steps: - run: echo hi | Aligned list under steps | CI workflow fragment |