What it does: trims trailing spaces, converts tabs to spaces, normalizes line endings, and (when safe) reindents using the detected indentation unit.
How to use
Use it to clean YAML without changing content (best-effort). For complex YAML features, review the result before using it in production.
- Paste your YAML into YAML input.
- Choose an indentation size (2 or 4 spaces).
- Click Format.
- Copy the result or click Use output as input to iterate.
FAQ
Is this a full YAML validator/linter?
No—this is a whitespace/indentation formatter with basic indentation consistency warnings; it does not fully parse YAML.
How does the formatter decide indentation levels?
It detects the most likely indentation unit from your file (e.g., 2 or 4 spaces) and reindents to your chosen size when indentation is consistent.
What if my YAML has inconsistent indentation?
The tool warns you and keeps the original indentation to avoid producing YAML that changes meaning or becomes invalid.
Does it support block scalars, anchors, and complex YAML features?
It preserves your text lines and only adjusts whitespace; for complex YAML, always review the formatted result before using it.
Why convert tabs to spaces?
Many YAML parsers reject tabs for indentation; converting tabs to spaces prevents common parse failures.
Is my YAML uploaded to a server?
No. Formatting runs locally in your browser and the tool does not make network requests.
Can I keep my current indentation but still clean whitespace?
Yes—if indentation is inconsistent, the formatter keeps it while still trimming trailing spaces and normalizing line endings.