Check one stream locally

Validate YAML syntax, aliases, and scalar mapping keys

The checker uses yaml version 2.9.0 with YAML 1.2 Core Schema by default and optional YAML 1.1 compatibility. Load the valid sample or the intentional tab-indentation error to see a local line-and-column diagnostic before pasting your own stream. The checker accepts multi-document streams and standard document features, but deliberately does not claim application-schema validation.

Loading the private YAML syntax checker…

Enable JavaScript to validate YAML locally. The error patterns, version boundary, and scope guidance below remain readable.

Find the first trustworthy failure

How to validate YAML online

Resolve syntax before investigating a platform schema. Later errors can be consequences of one missing colon, quote, or indentation boundary.

  1. 1

    Paste the complete YAML stream

    Include directives and every --- document separator that affects the parse. Prefer a redacted reproduction when a configuration contains credentials, tokens, private endpoints, or customer data.

  2. 2

    Select the consumer's schema version

    Use YAML 1.2 Core for modern behavior. Choose YAML 1.1 only when the real loader requires it, because plain scalar values such as yes and on can resolve to different types.

  3. 3

    Read the local diagnostic

    Fix the first syntax, unresolved-alias, or duplicate-scalar-key problem, rerun the check, and only then apply the authoritative Kubernetes, Compose, CI, OpenAPI, or application validator.

A precise parser-level result

What this YAML validator checks

YAML structure depends on indentation, collection indicators, mapping separators, scalar boundaries, anchors, aliases, tags, directives, and document markers. The validator asks yaml version 2.9.0 to parse every document in the stream and reports parser diagnostics with useful source positions when available. It rejects aliases that do not resolve to an earlier anchor in the same document and detects duplicate scalar mapping keys instead of silently choosing a later value.

YAML may also use a sequence or mapping as a complex key. This parser policy does not perform deep equality checks between complex collection keys, so a passing result does not prove that every downstream implementation will consider those keys distinct. Prefer scalar configuration keys and test unusual complex-key documents with the target loader.

Multi-document input, anchors, aliases, literal and folded block scalars, block collections, and flow collections are part of the supported grammar. Merge-key expansion is disabled. That matters because the optional << convention is not treated as permission to manufacture pairs or hide which keys were written directly.

A successful result is intentionally narrow. It says the source fits the supported YAML grammar, alias-order rule, and scalar-key duplicate policy under the chosen schema. It does not know whether apiVersion exists, whether a container image is allowed, whether a Compose service has legal fields, or whether a workflow permission is secure.

Syntax
Indentation, tokens, collections, scalars, directives, and document boundaries.
Scalar keys
A mapping cannot quietly repeat the same resolved scalar key; complex-key deep equality is not checked.
Schema choice
YAML 1.2 Core by default; YAML 1.1 only as explicit compatibility.
Not checked
Kubernetes, Compose, CI, OpenAPI, application rules, and business meaning.

Read structure before guessing

Common YAML syntax errors to inspect

Error wording can vary. Use the source location as the point where parsing became impossible, then inspect the preceding structural boundary.

SymptomLikely causeFocused check
Unexpected mapping valueA colon appears where the current scalar or collection cannot accept one.Check the previous line, quote ambiguous text, and keep a space after mapping colons.
Bad indentationA child moved to a level that has no matching parent or a tab was used for indentation.Use spaces consistently and align siblings at the same structural column.
Duplicate keyOne mapping defines the same resolved key more than once.Choose the intended value explicitly; do not rely on last-key-wins behavior.
Unclosed flow collectionA [ or { has no matching closing token.Trace nested flow collections and quoted strings from the reported line backward.
Unknown anchorAn alias refers to an anchor that is absent or unavailable at that point.Confirm the exact, case-sensitive anchor name and its position in the document.

Syntax is not a platform contract

Why valid YAML can still fail Kubernetes or Compose

Kubernetes manifests

A parser cannot prove that an API version, resource kind, metadata field, selector, pod specification, or custom resource matches the cluster's installed schemas and policies.

Docker Compose

YAML syntax does not establish that a service key, volume form, health check, network setting, interpolation expression, or Compose version is supported.

CI workflows

GitHub Actions, GitLab CI, CircleCI, and other systems define their own keys, expressions, permissions, and execution rules. A local syntax pass does not authorize or execute them.

Application configuration

Types resolved by the selected YAML schema can still differ from the application's expected types. Validate against the real loader and test the behavior in a controlled environment.

No validation API receives the source

Local YAML parsing with explicit limits

The interactive check runs in a disposable browser worker and accepts at most 200,000 UTF-16 code units. Moving parsing off the interface thread and bounding input helps keep the page responsive. These limits are an availability guard for this tool, not proof that a downstream YAML loader is configured safely.

LiveParse does not put the source in the page URL or send it to a validation service. Your browser, extensions, clipboard manager, downloaded files, backups, and device monitoring can have separate behavior. Redact secrets even when using a local tool, then apply the organization's approved validation and deployment workflow.

Syntax passed—what next?

Format the document for a reviewable diff, inspect anchors and aliases as nodes, or convert supported values to JSON with explicit conversion boundaries.

Open the YAML Formatter →
Open the YAML Viewer →
Convert YAML to JSON →

Validation scope

YAML validator FAQ

What does this YAML validator check?

It checks supported YAML syntax, rejects unresolved aliases, and detects duplicate scalar mapping keys under the selected schema. It supports multi-document streams and block scalars, with merge-key expansion disabled. It does not deeply compare complex collection keys.

Does valid YAML mean a Kubernetes or Docker Compose file is valid?

No. This is parser-level syntax, alias-order, and duplicate-scalar-key validation, not Kubernetes, Docker Compose, GitHub Actions, OpenAPI, or another application schema check. Use the authoritative platform validator afterward.

Does YAML validation happen on a server?

No. yaml version 2.9.0 runs in a local Web Worker. Input is limited to 200,000 UTF-16 code units and is not uploaded to a validation API.

Will this validator fix indentation or duplicate keys?

No. It reports diagnostics and leaves the source untouched. Automatic recovery could conceal which structure or value the author intended.