34 chars · 3 lines
Waiting for input
34 chars · 3 lines
Waiting for input
YAML indentation troubleshooting
Paste the failing YAML into the validator above to check the exact document rather than guessing from how it looks in an editor. The preloaded sample shifts port one space deeper than the surrounding mapping, which creates a nesting level that does not belong there. This tool is free to use. No account or payment is required.
Last updated
Unlike formats that use braces around every nested object, block-style YAML uses leading spaces to show which values belong together. Sibling keys need the same indentation and child content must be indented beyond its parent.
A parser can tell you that the indentation is impossible, but it cannot know whether a key should be a sibling, a child, or a new top-level section. Compare the corrected YAML with the configuration structure your application expects.
The port key has one extra leading space and should align with name.
service:
name: api
port: 8080service:
name: api
port: 8080Common questions
YAML does not require one universal width, but indentation must be consistent for each block. Two spaces is a common convention for configuration files.
Different nested levels can be represented with spaces as long as the structure is unambiguous, but mixing widths within sibling blocks is difficult to review and often causes mistakes.
No. YAML parsing runs locally in your browser.
Debugging a specific YAML issue? Browse YAML troubleshooting.