HCODX/YAML Validator
100% browser-based · YAML 1.2 spec · js-yaml engine

YAML Validator

Validate YAML 1.2 configuration files in real time. Catches syntax errors, indentation problems, duplicate keys, and bad references — with line and column numbers. Powered by js-yaml, runs entirely in your browser.

YAML input
Validation result
Options
Open in formatter
Input size
0 B
Lines
0
Errors
0
Status
Ready
Example

Valid vs invalid YAML

YAML cares about indentation. Tabs are not allowed for indenting, and inconsistent spacing breaks the parse. The validator points to the exact line where it gave up.

Valid
name: hcodx
version: 1
tags:
  - dev
  - tools
owner:
  name: Alice
Invalid — bad indent at line 4
name: hcodx
version: 1
tags:
 - dev
   - tools
owner:
  name: Alice
Use cases

What you'll use this for

YAML is everywhere modern infrastructure lives — manifests, pipelines, playbooks, schemas. Validate before you commit.

Kubernetes manifests

Catch indent and quote errors before kubectl apply rejects them.

GitHub Actions

Validate .github/workflows/*.yml before pushing a broken pipeline.

Ansible / Docker compose

Verify playbooks and compose files locally instead of finding errors at run-time.

OpenAPI specs

Quick check that a YAML spec parses before feeding it to a generator.

Step by step

How to validate YAML

1

Paste your YAML

Drop it into the left editor. CodeMirror highlights syntax — keys, strings, anchors — as you type.

2

Click Validate

Or leave auto-validate on for live feedback. js-yaml runs locally — no server.

3

Read the report

If valid you'll see a tick plus the document parsed as JSON. If invalid you'll see the YAMLException's line, column, and reason.

4

Fix and re-run

Re-indent, escape, or quote as needed. Auto-validate keeps the report fresh while you type.

FAQ

Frequently asked questions

Validates against the YAML 1.2 spec, which is the de-facto standard used by Kubernetes, GitHub Actions, and most modern tools. js-yaml 4.x supports 1.2 by default.

Yes. YAML is whitespace-sensitive — inconsistent indentation triggers a YAMLException with the offending line. Tabs are not allowed as indent characters.

Yes. Completely free, no signup, no limits, no ads.

No. js-yaml is loaded once from a CDN; after that everything runs locally. Your data never leaves your device.

No — only syntax (well-formedness). For schema validation, use a tool like Ajv after converting the YAML to JSON.

About

About this validator

YAML's readability — indentation instead of brackets, no quotes around most strings — is also its biggest source of mistakes. A stray tab, a colon without a space, or an unexpected anchor reference will break the parser. This validator gives you fast, line-precise feedback before the YAML hits Kubernetes, CI, or your config loader.

What it checks

  • Indentation — spaces only (no tabs), consistent depth per block.
  • Mapping syntaxkey: value with a space after the colon.
  • Strings — quoted ("..." or '...') and bare; correct escape sequences.
  • Anchors & aliases&name defines, *name references; unknown aliases fail.
  • Multi-document--- separators are tolerated; first doc is parsed and reported.
  • Special valuestrue, false, null, dates, numbers per YAML 1.2 schema.

What it doesn't do

  • Schema validation. No JSON-Schema / OpenAPI checks here — only syntactic well-formedness.
  • Kubernetes-specific rules. A YAML file can be valid YAML but invalid Kubernetes — use kubectl --dry-run for that.
  • Multi-doc loading. Reports the first parse error; subsequent docs aren't validated.
Related

Related tools