Code Tools

YAML Linter

All tools

Flag the three spacing mistakes that break YAML most often, with a line number for each.

How it works

Four simple steps

1

Paste YAML

Replace the sample with your own config.

2

Three rules run

Tabs, colons without a space and dashes without a space.

3

Read line numbers

Each finding names the line so you can jump to it.

4

Confirm it is clean

Fix the lines until the output reads No issues found.

YAML Linter

About YAML Linter

Most broken YAML is not exotic. Someone pressed Tab in a config file, typed key:value without a space, or wrote -item instead of - item. This linter points straight at those lines.

Each line of your input is checked against three rules. Tab characters are reported, because YAML does not allow tabs for indentation. A colon followed directly by a non-space character is flagged as a possible missing space (lines containing http: or https: are skipped so URLs do not trigger it). A dash at the start of a line followed immediately by text is flagged as a list item missing its space. Findings are listed as Line 3: followed by the problem, and they update as you type; a clean file shows No issues found.

The colon rule is a heuristic, so expect false positives on values such as times (12:30), Windows paths or quoted strings that contain colons. Read each finding rather than fixing blindly. The linter also runs a lightweight built-in parse that only understands simple key: value maps, so it will not catch deeper problems. For a full syntax check, use the js-yaml based validator, and for trailing whitespace and blank lines, the YAML whitespace formatter. Container builds have their own Dockerfile Linter.

No library is downloaded for linting; the rules are plain pattern checks that run in the page.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

The rule looks for a colon followed directly by a non-space character, which also matches 09:00 or C:\temp. If the line is otherwise correct, ignore the warning or quote the value.

Not necessarily. The linter checks spacing patterns, not the full YAML grammar. Indentation mistakes, unclosed quotes and duplicate keys need the YAML Validator.

No. It reports line numbers only. The fixes are usually one character (replace a tab, add a space), so make them in your editor.

View more FAQs

Related tools

View all

HTML Formatter

Beautify and indent HTML markup.

Open

CSS Formatter

Format and pretty-print CSS.

Open

JS Formatter

Beautify JavaScript code.

Open

JSON Formatter

Beautify and validate JSON.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools