YAML Formatter
Validate and format YAML configs with configurable indent and key sorting.
Your input is processed locally in this browser tab.
How to use YAML Formatter
Paste a YAML config file or load one from disk.
Pick 2-space or 4-space indentation and optional Sort keys.
Verify the green Valid badge and copy or download the clean YAML.
Frequently asked questions
Does YAML Formatter detect duplicate mapping keys or tab indentation errors?
Yes. Duplicate keys and tab-based indentation trigger line-numbered syntax errors.
Are reserved scalar strings like "yes", "on", or "123" safely quoted?
Yes. Ambiguous strings stay quoted during YAML output so types round-trip faithfully.