How to use
- Paste your YAML, or click Load sample.
- Choose the indentation.
- Click Format, or press Ctrl+Enter (⌘+Enter on Mac).
- Copy the formatted YAML.
Options explained
- Indent
- Indentation for nested mappings. Two spaces is the usual style for Kubernetes, Compose and GitHub Actions files.
Examples
Mixed indentation. A Compose file with four-space and two-space sections is re-indented consistently.
Validate before committing. Paste a GitHub Actions workflow to catch a stray tab or missing colon.
Frequently asked questions
Are comments kept?
Yes. Comments, key order, anchors and multi-document separators (---) are preserved.
Why does it report an error on a line that looks fine?
YAML errors often come from indentation on an earlier line, or from a tab character — YAML does not allow tabs for indentation. Check the lines just above the reported position.
Is my file uploaded?
No. Formatting runs in your browser, so configuration with hostnames or keys stays on your device.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.