Browser-local validator

YAML Validator

Check YAML indentation and structure in your browser, with tabs reported on their own line and the line number of the first problem.

YAML Validator

Processed in this browser
Paste YAML
Ready to copy

How to use it

A short path from source data to a usable local result.

01

Add YAML

Paste or upload a mapping or a list written with consistent indentation.

02

Run the check

Tabs are reported first, then the structure is read level by level.

03

Read the report

A pass names the top-level shape and its size; a failure names the line that breaks the indentation.

Common questions

Details that matter when moving data between formats.

Why are tabs reported separately?

YAML indentation must be spaces, and a tab is easy to miss because it looks like spaces in most editors. Every line is checked for a tab before the structure is read, so the tab is reported with its line number instead of turning into a confusing parse error somewhere else.

Which YAML features are supported?

Mappings, nested mappings, lists, quoted strings, plain scalars, booleans, null, and comments. Anchors, aliases, merge keys, block scalars, complex keys, and multiple documents are detected and reported as unsupported rather than silently misread.

Does the indentation have to be two spaces?

No. Any consistent width works as long as a child is indented further than its parent. The page reports a line whose indent does not match the block it belongs to.

Is my file uploaded?

No. The document is read in this tab and nothing is sent to a server.

Related tools

Other focused converters that are already available.

When is YAML Validator useful?

YAML is the format people edit by hand, and it is the format that punishes a hand edit. A single tab where the file expects spaces, one indent of three spaces among siblings indented by two, a list item that lost its dash, or a colon that moved one character are each enough to produce a file that looks right in an editor and parses into something else entirely. This page checks the document inside the tab: it looks for tabs first, then reads the structure level by level and reports the first line that does not fit.

Tabs are reported on their own line before any structural check runs, because a tab is invisible in most editors and the parse error it causes usually points somewhere else. The message names the line and says what to do: YAML indentation must be spaces. A tab that sits inside a value rather than in the indentation gets a different message, because the fix is different. After the tab check the report covers indentation that does not line up with the block above it, a list item and a key mixed at the same level, a list that starts without a key to hang from, an item with no value, and a line that is neither a key: value pair nor a list item.

The reader behind this page covers the part of YAML that configuration files actually use: mappings, nested mappings, lists, quoted strings, plain scalars, booleans, null, and comments. It does not implement anchors, aliases, merge keys, block scalars written with a pipe or a greater-than sign, complex keys, or several documents in one file. Rather than misread those constructs, the page detects them and reports them as unsupported with the line they appear on, so a document that relies on them is never quietly accepted with the wrong meaning. A successful check names the top-level shape, counts the keys or items, lists the key names, and reports the nesting depth. Once a document passes, the YAML Formatter normalizes its indentation and the YAML to JSON tool converts it.