WizzyTools

Format and re-indent YAML online

Works offline · never uploaded

Normalize inconsistent YAML indentation to a consistent width instantly in your browser.

Updated

/ 5 - Be the first to rate this tool Thanks for rating!

Verification failed - please try again.

How it works

  1. 1

    Paste the YAML into the Input box.

  2. 2

    Choose the indent you want.

  3. 3

    Press Format and review the output.

  4. 4

    Copy the result back into your file.

About the YAML Formatter

YAML relies on indentation for meaning, so a file that mixes two-space and four-space blocks, or tabs pasted from an editor, is hard to read and easy to break. This formatter looks at how deeply each line is nested relative to the lines above it and rewrites every line with one consistent indent unit, while leaving the keys, values and comments on each line unchanged.

What you can do

  • Re-indent a whole document to 2 spaces, 4 spaces or tabs.
  • Normalise files where different sections were written with different indent widths.
  • Keep blank lines, comments and list dashes in place; only the leading whitespace changes.
  • Copy the cleaned document with one click.

When it works best

  • Bringing a Kubernetes manifest or Docker Compose file in line with a team style before review.
  • Fixing a GitHub Actions workflow that was assembled from snippets with mismatched indentation.
  • Converting a tab-indented file to spaces, which most YAML parsers require.

Things to know

  • The tool reindents text in your browser; nothing is uploaded.
  • It does not parse or validate YAML, so a missing colon or a bad value will not be reported. Choosing Tab produces a file that strict YAML parsers will reject, so use it only where your tooling accepts tabs.
  • Nesting is inferred from relative indentation. Multi-line block scalars (text after | or >) are reindented like any other line, so check them after formatting.
  • To turn YAML into JSON, or JSON into YAML, use YAML ↔ JSON.

Frequently asked questions

No, it only changes indentation. Keys, values and comments are left as written.

Only if your tooling accepts it. Strict YAML parsers reject tabs.

Yes, nesting is inferred from relative depth and rewritten with one consistent unit.

Text after | or > is reindented like other lines, so check it after formatting.