YAML Formatter
Tidy YAML indentation and whitespace for clean config files.
What is YAML Formatter
YAML formatting normalizes indentation to 2 spaces and trims trailing whitespace, improving readability of configuration files.
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
Tabs are illegal, so they are converted
YAML forbids tab characters for indentation, and half the files that fail to parse fail for that reason. This formatter replaces leading tabs with two spaces and normalises trailing whitespace, which fixes the syntax without changing structure.
It re-indents by tracking the existing indentation levels rather than by parsing the document into a tree. That is safer for comments and anchors, which a full parse-and-reserialise would drop, but it means a file with genuinely inconsistent indentation will be made consistently wrong rather than corrected.
Values that change type without changing text
YAML 1.1 treats yes, no, on and off as booleans — the 'Norway problem', where the country code NO becomes false. Version numbers lose their second dot (1.10 becomes 1.1, a float), and unquoted 22:30 can be read as a sexagesimal integer by some parsers.
A formatter that only touches whitespace does not change these, but a round trip through a parser does. If a field must stay a string, quote it in the source; formatting will not protect you from a consumer that applies its own type resolution.
Multi-document files and block scalars
Documents separated by --- and terminated by ... are supported as separate blocks, and each is indented independently. Block scalars (| and >) are the fragile part: their content is defined by indentation relative to the parent key, so re-indenting the parent changes the string.
Check any indented multi-line value after formatting — a shell script or SQL embedded as a block scalar is the usual casualty. If the value matters, compare its content after parsing rather than eyeballing the indentation.
How to use
- 1.Paste your YAML
- 2.Click Format
- 3.Copy the result
How this compares
There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.
| Aspect | This tool | Upload-based converters | Desktop software |
|---|---|---|---|
| Where the file is processed | In your browser, on this page | On the vendor's servers, after an upload | On your own machine, after installing an app |
| Account required | No | Usually — free tiers ask you to sign in before lifting a limit | No, though a licence may be needed |
| Size you can process for free | No size cap, no run limit | A few files per hour, or a ~5–10 MB cap before a paywall | Whatever your disk and RAM allow |
| Price | Free. Pro is $9/month, and only buys larger files and AI features | Usually a subscription — roughly $7–15/month as of November 2026 | A one-off licence, or a subscription |
| Works offline | Yes, once the page has loaded | No | Yes |
| Time before work starts on a 20 MB file | Immediate — there is nothing to upload | Dominated by the upload — about 16 s on a 10 Mbps uplink | Just the app launch |
| What it cannot preserve | Invalid input returns the parser error position instead of a repaired file | The same — the conversion is the same maths | The same, though some desktop apps re-render styles more faithfully |
Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.
Frequently asked questions
What is YAML formatting?
It tidies indentation and whitespace to make YAML readable.
Do values change?
No. Only cosmetic whitespace is normalized; the structure stays the same.
What this kind of conversion cannot keep
Formatters parse the input into a tree and print it back with consistent indentation. If the input is invalid, you get the parser's error position instead of a silently mangled file — malformed JSON stays malformed rather than being «repaired» into something that is no longer yours.
More in Format
On this page
- What is YAML Formatter
- What it does with your file
- How it actually behaves
- How to use it
- How this compares
- FAQ
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →