YAML Formatter

Validate and format YAML files

What is YAML?

YAML (YAML Ain't Markup Language) is a human-readable data serialization format commonly used for configuration files. It uses indentation to represent structure, making it clean and easy to read—but also sensitive to whitespace errors.

This formatter validates YAML syntax and catches common mistakes like tabs (which are not allowed) and missing colons in key-value pairs.

YAML Syntax Basics

Key-Value Pairs

key: value — Simple assignment with colon and space.

Nested Objects

Use 2-space indentation to nest objects under parent keys.

Lists

- item — List items start with a dash and space.

Common YAML Errors

ErrorFix
Tabs usedReplace with spaces (2 or 4)
Inconsistent indentUse same number of spaces throughout
Missing colonAdd colon after key names

FAQ

Why can't I use tabs in YAML?

The YAML spec explicitly forbids tabs for indentation. Use spaces only—typically 2 spaces per level.