Zero Signup ToolsFree browser tools

Developer Tools

YAML Validator

Validate YAML in your browser. See the line, column, and likely cause of every error, with hints for tabs, duplicate keys, and unterminated quotes.

0 chars

Result

Awaiting input. Paste YAML on the left to validate it.
Paste a YAML document on the left. The validator runs in your browser as you type, reporting the exact line, column, and likely cause of any syntax error. Try the Load sample buttons to see a known-good Kubernetes manifest or a broken file in action.
What this validator checks (and what is out of scope)

Accepted by this validator

  • Block mappings (key: value) and block sequences (- item) with any consistent leading indent.
  • Plain, single-quoted, and double-quoted scalars with full escape support including \xNN, \uNNNN, and \UNNNNNNNN.
  • Flow-style collections: [a, b, c] and {k: v} with nested values.
  • Literal | and folded > block scalars with strip / clip / keep chomping (-, default, +) and explicit indent indicators.
  • Multi-document streams: separators (---) and end markers (...).
  • Trailing # comments and standalone comment lines.
  • Anchors (&name) and aliases (*name) with reference validation.
  • YAML 1.2 core types: strings, integers (decimal / hex / octal), floats, booleans, null, and special floats (.inf, .nan).

Rejected (common YAML mistakes)

  • Tab characters inside leading indentation (forbidden by the YAML specification).
  • Duplicate mapping keys (per-mapping and per-flow).
  • Misaligned sibling keys or sequence items.
  • Unterminated single- or double-quoted strings, including inside flow collections.
  • Invalid escape sequences inside double-quoted strings.
  • Unclosed flow collections ([... or {...) or extra content after the closing bracket on the same line.
  • Aliases (*name) that reference an anchor that was never defined.
  • Smart / curly quotes pasted from word processors and a UTF-8 byte order mark at the very start of input.
  • Sequence markers without the required space after - (so "-value" is correctly flagged as a plain scalar, not a sequence item).

Out of scope: directives like %YAML, %TAG, complex / non-string mapping keys (? key syntax), merge keys (<<:), explicit schema tags beyond the YAML 1.2 core types, and binary content tagged with !!binary. The validator covers the YAML 1.2 subset used by Kubernetes, GitHub Actions, GitLab CI, Docker Compose, Ansible, and OpenAPI configurations.

How to use

  1. Paste your YAML into the input box on the left. The validator runs in your browser as you type.
  2. Read the green Valid banner or the red Invalid banner above the result panel. The red banner names the line and column of the first failure.
  3. If invalid, open the Error location panel for a code snippet with a caret pointing at the bad character, and check the Likely cause hint for a plain-English explanation.
  4. If valid, scroll down to Document breakdown for per-document summaries plus node counts, max depth, deepest path, and largest sequence and mapping sizes.
  5. Click Copy error report to copy a self-contained, paste-ready description of the failure (location, hint, and a code snippet) when sharing the error with a teammate.
  6. Try Load valid sample for a worked Kubernetes manifest stream, or Load broken sample to see how the validator reports a tab in indentation, a duplicate key, an unclosed flow collection, and an unterminated quoted string.

About this tool

YAML Validator is a single-purpose strict YAML checker. Paste any YAML document on the left and the tool tells you in plain English whether it parses as valid YAML 1.2 core schema. When the input is invalid it shows the exact line, column, and 0-based byte index of the failure, draws a code snippet with the surrounding lines, marks the bad character with a caret pointer, and adds a Likely cause hint that explains the most common cause in plain English. The hint engine recognises tab characters in leading indentation (forbidden by the spec), duplicate mapping keys inside the same block or flow mapping, misaligned sibling keys and sequence items, unterminated single- or double-quoted strings (including inside flow collections), invalid escape sequences in double-quoted strings (\x \u \U and the standard letter escapes), unclosed flow collections like [a, b, c and {k: v, sequence markers without the required space after - so -value is correctly flagged as a plain scalar rather than a sequence item, aliases (*name) that reference an anchor that was never defined, smart or curly quotes pasted from word processors, and a UTF-8 byte order mark at the very start of input. When the input parses, the tool reports a per-document summary plus a global breakdown: document count, root type per document, total node count, max nesting depth, mapping / sequence / scalar counts, scalar type distribution (strings, numbers, booleans, nulls), total and unique key counts, the deepest dotted key path in the tree, the largest sequence, and the largest mapping. The parser covers the YAML 1.2 subset that real config files use: block mappings and block sequences with any consistent leading indent, plain / single-quoted / double-quoted scalars with full escape support, flow-style [a, b] and {k: v} with nested values, literal | and folded > block scalars with all three chomping indicators, anchors (&name) and aliases (*name), multi-document streams with --- separators and ... end markers, and trailing # comments. Useful for catching the indentation drift that breaks Kubernetes apply, finding the duplicate key that makes a GitHub Actions workflow ignore half your steps, spotting the missing closing bracket in a Docker Compose flow value, and confirming that an Ansible playbook or OpenAPI spec parses cleanly before commit. Everything runs locally in the browser; nothing is uploaded, logged, or sent to a server.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools