Toffeekit
  • Home
  • All tools513
  • Recent
  • Favorites
Categories
  • Images51
  • Video21
  • PDF33
  • AI24
  • Data21
  • SEO12
  • Developer32
  • Text27
  • Design18
  • Files13
  • Utilities5
  • Productivity17
  • Finance26
  • Math39
  • Education19
  • Date & Time29
  • Converters43
  • Fun & Random24
  • SaaS13
  • Business17
  • Social11
  • Media5
  • Security13
Buy me a coffee
ToffeekitDeveloperYAML Formatter

YAML Formatter

Validate and reformat YAML, keeping comments and anchors. Multi-document files work. Runs entirely in your browser, so nothing is uploaded.

Help
Runs locally Instant, no sign-up Works offline
Use cases

One click to the right settings

Tidy Kubernetes YAML

Two-space indent with list items flush under their key.

Expand inline lists

Turn { } and [ ] flow style into block style.

Sort keys

Order every mapping A to Z for cleaner diffs.

How it works

How to use YAML Formatter

  1. 01Paste YAML into the input, or click Open to load a .yaml or .yml file.
  2. 02Choose an Indent and whether list items are indented under their key.
  3. 03Turn on Sort A to Z, Expand { } and [ ], or Fold at 80 chars if you need them.
  4. 04Check the status line for errors or warnings, then Copy or Save the result.
Questions

YAML Formatter FAQ

6 answers to what people ask most about the YAML Formatter.

How do I validate a YAML file?

Paste it in. Errors show the line, column and a snippet of the problem, such as bad indentation, a tab character or a duplicate key.

Are comments kept when formatting?

Yes. Comments, anchors (&name), aliases (*name) and merge keys (<<) are kept, because the file is reformatted rather than converted to data and back.

Why are tabs an error in YAML?

The YAML spec forbids tabs for indentation. Replace them with spaces, usually two per level.

Can it handle multiple documents in one file?

Yes. Documents separated by --- are each validated and formatted, which suits Kubernetes manifests with several resources.

What does Indent list items under key change?

On, list items are indented under their parent key. Off, the dash lines up with the key, which is the style kubectl and many Kubernetes examples use. Both are valid YAML.

Is YAML Formatter free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

Something not working? Tell us and we'll fix it.

Report an issue
More tools
JSON Formatter

Format, minify and validate JSON with clear errors.

Developer
Base64 Encode / Decode

Encode text to Base64 or decode it back, UTF-8 safe.

Developer
URL Encode / Decode

Percent-encode query values or whole URLs.

Developer
HTML Entities

Escape < > & and quotes, or decode entities.

Developer
Something off with YAML Formatter? Report an issue or ask for a feature.Send feedback
© 2026 Toffeekit/Runs locally · No uploads · Free
AboutContactFeedbackPrivacyTermsCookiesSettingsllms.txt