YAML
Paste YAML with messy indentation below.
Paste YAML with inconsistent indentation and normalize every nesting level to clean two-space steps. Trailing whitespace is trimmed and comments and blank lines are preserved, all locally in your browser.
Paste YAML with messy indentation below.
The tool reads the leading whitespace of every non-empty line, maps each distinct indent width to a nesting level, and re-emits the file with two spaces per level. Comments and blank lines pass through untouched, and trailing spaces are stripped from every line.
YAML has no braces, so indentation is the syntax. Mixing two and four spaces, or tabs and spaces, breaks parsers with cryptic errors. Normalizing to one consistent width makes configs for Docker Compose, GitHub Actions and Kubernetes far less error prone.