LocalExcelTool
Get started

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. 1.Paste your YAML
  2. 2.Click Format
  3. 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.

AspectThis toolUpload-based converters
Where the file is processedIn your browser, on this pageOn the vendor's servers, after an upload
Account requiredNoUsually — free tiers ask you to sign in before lifting a limit
Size you can process for freeNo size cap, no run limitA few files per hour, or a ~5–10 MB cap before a paywall
PriceFree. Pro is $9/month, and only buys larger files and AI featuresUsually a subscription — roughly $7–15/month as of November 2026
Works offlineYes, once the page has loadedNo
Time before work starts on a 20 MB fileImmediate — there is nothing to uploadDominated by the upload — about 16 s on a 10 Mbps uplink
What it cannot preserveInvalid input returns the parser error position instead of a repaired fileThe same — the conversion is the same maths

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