YAML Validator / Linter
Syntax-check YAML with the exact line, column and cause of every error — plus lint warnings on valid files, entirely on this device.
The verdict appears here as you type — every document in the stream gets its own result.
Press ? for shortcuts
Do it offline:$ yamllint file.yaml
How to use it
- Paste YAML, or drop a .yml or .yaml file up to 20 MB; past 2 MB a button names the size it is about to validate.
- Read the per-document list: every document reports its own verdict, with the message, a code frame and a Jump-to-error button.
- On valid files, work the warnings: a one-click Quote this value edit for ambiguous scalars, toggles for duplicate-key, tab, trailing-whitespace, non-string-key and long-line checks, and a 1.2/1.1 Spec mode.
- Copy or download the validation report as .txt, or use Share — beyond 8 KB compressed, a note under the actions offers a state file instead.
Paste a YAML file and each document gets its own verdict: the exact line, column and cause of every syntax error, or lint warnings on files that technically parse — ambiguous booleans, octal-looking scalars, version numbers that quietly become floats. Built for the files that break pipelines: Kubernetes manifests, GitHub Actions workflows, docker-compose. Every check runs on this device; a plain-text validation report is one keystroke away.
Examples
on: [push]
jobs:
build:
runs-on: ubuntu-latest
Tab used as indentation at line 4, column 1 — YAML forbids tabs in indentation; replace the tab with spaces.The classic workflow-file failure: one invisible tab where spaces belong. The caret in the code frame sits on the tab itself.
country: NO
version: 1.20Unquoted `NO` at line 1, column 10 — reads as the string "NO" here (YAML 1.2) but as boolean false under YAML 1.1 — the "Norway problem"; quote it as "NO" to keep the text in every parser.A valid file, two traps: Quote this value wraps NO with one click, and a second warning covers 1.20, which parses as the number 1.2 in both spec modes.
apiVersion: v1
kind: Namespace
metadata:
name: staging
---
apiVersion: v1
kind: Service
metadata:
name: api
spec:
type: ClusterIP
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
Duplicate key `type` at line 12, column 3 — the same key first appears at line 11; YAML mappings require unique keys, so remove or rename one of them.Documents 1 and 3 stay valid with their tree previews — a broken document never hides the rest. The duplicate-keys toggle demotes this to a last-wins warning naming both lines.
{"ports": [80, 443], "tls": true}This is JSON, which is valid YAML — YAML 1.2 parses every JSON document unchanged.YAML 1.2 was specified as a superset of JSON, so braces pass straight through; the banner links the JSON validator.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Merge keys are a 1.1-mode feature
On YAML 1.1, `<<: *defaults` folds the referenced entries into the surrounding mapping, with a note. Under 1.2 the same `<<` is an ordinary key — the note points at the toggle.
Custom tags parse with a notice
A CloudFormation `!Ref` or any application tag comes back as a tagged value plus a note ending “this validator checks syntax, not tag semantics” — never an aborted run.
An in-document %YAML directive outranks the toggle
A file opening with `%YAML 1.1` is taken at its word: the directive overrides the Spec mode option for that document and the rest of the stream. Warnings then speak the effective mode.
CRLF files keep visible line numbers
Windows line endings are legal YAML, and positions count the lines you see — a missing colon-space on line two of a CRLF file reports at line 2, column 5.
The 20 MB ceiling
Past the cap the whole input is declined — a verdict on a truncated file would be a guess. The banner prints the exact limit and repeats the CLI line below.
Aliases expand under a 10,000-node budget
Anchor references are counted before anything expands: a billion-laughs file is refused with an explanation naming the 10,000-node budget, never a frozen tab.
Share links cap at 8 KB compressed
Share folds the input into the URL fragment, which no server receives; past 8 KB compressed, a Download state (.json) button appears below the actions instead.
Common errors
Tab used as indentation at line 2, column 1 — YAML forbids tabs in indentation; replace the tab with spaces.- Indentation is spaces, no exceptions. Editors set to tab-indent produce this instantly — configure them to expand tabs for .yml files.
Bad indentation at line 4, column 1 — expected 2-space indent under `services:`, found 3; align this line with its block.- Three spaces align with no open block; the message reconstructs the indentation and names the parent key this line should sit under.
Unclosed quoted string at line 3, column 1 — a double quote opens but never closes; add the matching `"`.- An open quote swallows every following line while waiting for its partner, so the position marks where the input ran out — read upward from there.
Missing space after the colon at line 3, column 7 — `port:8080` reads as one scalar, not a key/value pair; write `port: 8080`.- A mapping colon needs a following space; without one the token is a single plain scalar. It bites hardest coming from JSON, where "port":8080 is fine.
Duplicate key `image` at line 2, column 1 — the same key first appears at line 1; YAML mappings require unique keys, so remove or rename one of them.- Repeated keys error by default because parsers disagree about which value survives; the toggle accepts last-wins parsing with a warning naming both lines.
Input is larger than the 20 MB limit for this tool. For bigger files use the CLI: yamllint file.yaml- Refusing outright keeps the verdict honest — half a manifest can parse while the missing half is broken; yamllint covers any size locally.
FAQ
What is the Norway problem in YAML?
Under YAML 1.1, sixteen unquoted spellings — y, Y, n, N, plus yes, no, on and off in lower, Title and UPPER case — parse as booleans, turning Norway's NO into false. YAML 1.2 dropped the rule, so this page warns on exactly those spellings, states both readings and offers the one-click quote. Mixed casings such as yEs stay unflagged — both editions read them as strings.
Can I validate a multi-document YAML stream?
Yes — --- separators are first-class. Each document gets its own numbered verdict, error list and collapsible tree; the manifest example above totals 3 documents and 15 keys. A schema-aware Kubernetes validator and a YAML formatter are planned for this site.
Is my YAML uploaded when I validate it?
No. Parsing happens in this tab — from 256 KB in a worker thread on your machine — and the network panel stays quiet while you type. Share is the deliberate exception: it encodes the input into the link, so treat that link like the data it carries.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Validate now — required past 2 MB; an instant re-run below that.
- ⌘/Ctrl + S
- Download the validation report as .txt instead of saving the page.
- ⌘/Ctrl + C
- Copy the validation report while nothing is selected; a real selection copies normally.
- ⌘/Ctrl + Shift + C
- Copy the report even while a selection is active.
- t
- Cycle the theme (inert while typing in a text field).
- ? or ⌘/Ctrl + /
- Open the shortcut overlay, browser-conflict notes included.
- Esc
- Close the topmost dialog — never the input.