Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

YAML Formatter

heuristic YAML spacing blank-line compaction reindent. Uses the bundled YAML parser to preserve parsed values. Formatting does not preserve comments or original scalar style. Script/settings generation remains available where provided.

Scope of this tool: Uses the bundled YAML parser to preserve parsed values. Formatting does not preserve comments or original scalar style. Script/settings generation remains available where provided.

Parser-backed YAML formatting preserves parsed values, not comments or original scalar style. Legacy tab-rewriting/compact options do not rewrite YAML values.

Notes: tabs are not valid YAML indentation. Advanced YAML features (anchors/merge keys, multi-line scalars) are preserved as-is when possible, but this tool focuses on indentation and spacing cleanup.
Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Use it in seconds:

  1. Paste your YAML into the input box.
  2. Choose an indent size (2 or 4) and optionally enable Compact mode.
  3. Click Format YAML.
  4. Copy the formatted result.

FAQ

What does this YAML formatter change?

It normalizes indentation (2 or 4 spaces), fixes common spacing (after : and -), trims trailing whitespace, and keeps comments.

Does it validate YAML fully?

It catches common indentation errors and tabs, but it’s not a full YAML parser/linter for every YAML feature.

Why are tabs rejected?

YAML indentation must use spaces; tabs frequently break parsers. Replace tabs with spaces before formatting.

Will my comments be kept?

Yes. Full-line and inline comments are preserved, and inline comments are normalized to a single space before #.

Does Compact mode change the data?

No. It only reduces extra blank lines and trims the output, making it shorter without changing keys/values.

Is my YAML sent to a server?

No. Formatting runs locally in your browser; the tool doesn’t make network requests.

Can I use this for Kubernetes or Docker Compose YAML?

Yes—this is great for cleaning up manifests and compose files, especially indentation and list formatting.

Continue your workflow

Browse related tools by task. Use the improved core tools for a consistent workspace with file import, downloads and clear validation errors.