sitekits.dev
press ⌘K to switch tools
VALIDATE & INSPECT

YAML Validator

Validate YAML syntax and view the parsed result.

local
yaml-validator
§01 ABOUT THIS TOOL

Overview

YAML Validator checks YAML syntax live as you type and, when the document is valid, shows the parsed structure as pretty-printed JSON. It uses js-yaml, the same parser found in countless Node.js toolchains, so errors and type inference match what your build pipeline will do. Useful for debugging CI configs (GitHub Actions, GitLab CI), Kubernetes manifests, and Docker Compose files before committing them.

How to use

  1. Paste or type your document into the YAML field.
  2. Read the status line below it: Valid YAML on success, or the parser’s error message — including the line and column of the problem — on failure.
  3. When valid, review the Parsed (as JSON) panel to confirm the structure and inferred types.

Examples

Input:

server:
  host: localhost
  port: 8080

Parsed (as JSON): { "server": { "host": "localhost", "port": 8080 } } — note port is a number, not a string.

A tab character used for indentation produces an error naming the offending line, since YAML forbids tabs in indentation.

Notes

The validator parses a single document; multi-document streams separated by --- are not fully reported. Validation covers syntax only — it cannot know whether the keys are correct for the tool consuming the file (that requires a schema-aware linter for the specific format).

Documents whose anchors and aliases reference each other in a way that multiplies out are refused before parsing. A few hundred bytes of nested aliases can expand to hundreds of megabytes — 253 bytes reaching 22.8 MB is easy to construct — which would freeze the tab. Ordinary anchor use, including the <<: merge keys that appear throughout Docker Compose and CI configs, is unaffected. Input above 2 MB is also refused.

FAQ
Is my YAML sent to a server?
No. Parsing runs in your browser using the js-yaml library; configuration files, secrets, and CI definitions never leave the page.
Why is the parsed result shown as JSON?
JSON makes the parsed structure unambiguous. YAML has many ways to write the same data, so seeing the resulting objects, arrays, strings, and numbers as JSON confirms exactly how a consumer will interpret your document.
My YAML is valid but a value parsed differently than I expected. Why?
YAML infers types aggressively: unquoted no becomes false in some schemas, 08 can fail as octal, and 1.0 becomes a number. Quote values you want treated as strings, and use the JSON preview to verify the inferred types.