Tab inserts two spaces (press Esc then Tab to leave the editor). Drop a file to open it. Positions are line:column in UTF-16 code units.
Paste YAML or open a file to validate
rev 1 · YAML 1.2 · core schema · no schema
—
—
No schema selected
—
Results appear here.
YAML parser errors
Reported by the syntax layer with exact character ranges. Codes are the parser’s own error codes.
Tab used for indentation TAB_AS_INDENT
YAML forbids tab characters in indentation; only spaces define nesting. Tabs are allowed inside values and after content.
Problem
server:
port: 80
Fixed
server:
port: 80
Fix: Replace leading tabs with spaces that line up with sibling keys.
Inconsistent indentation BAD_INDENT
A line is indented to a level that does not match any open block. Siblings must share exactly the same indentation.
Problem
a:
b: 1
c: 2
Fixed
a:
b: 1
c: 2
Fix: Align the line with its siblings or its intended parent.
Missing character MISSING_CHAR
The parser expected a specific character, most often the ": " after a mapping key, or a closing quote/bracket.
Problem
name api
Fixed
name: api
Fix: Add the missing ":" (followed by a space), quote, or bracket.
Key spans several lines MULTILINE_IMPLICIT_KEY
An implicit (plain) key must fit on one line. Often caused by a missing ":" on the previous line, so two lines are read as one key.
Problem
first
second: 1
Fixed
first: x
second: 1
Fix: Check the previous line for a missing colon, or use an explicit "? key" form.
Block collection used as a key BLOCK_AS_IMPLICIT_KEY
A block mapping or sequence appears where a simple key is required, usually because of wrong indentation.
Fix: Fix the indentation so the block belongs to a key.
Unexpected token UNEXPECTED_TOKEN
A character appears where the grammar does not allow it, e.g. a stray "]" or content after a closed flow collection.
Problem
list: [a, b]]
Fixed
list: [a, b]
Fix: Remove or quote the unexpected character.
Value starts with a reserved character BAD_SCALAR_START
Plain scalars cannot start with indicators such as @, `, or a lone % in some positions.
Problem
user: @admin
Fixed
user: "@admin"
Fix: Quote the value.
Invalid escape in double quotes BAD_DQ_ESCAPE
Inside "double quotes" a backslash starts an escape; \q or a Windows path like "C:\new" is invalid or changes meaning.
Problem
path: "C:\temp\x"
Fixed
path: 'C:\temp\x'
Fix: Use single quotes for literal backslashes, or escape them as \\.
Duplicate mapping key DUPLICATE_KEY
YAML requires every key in a mapping to be unique. Parsers disagree on what happens otherwise: some keep the first value, many keep the last, strict ones reject the file. ValidateYAML lists every occurrence instead of silently collapsing them.
Problem
image: nginx:1.25
image: nginx:1.27
Fixed
image: nginx:1.27
Fix: Delete the occurrence you did not mean, or rename one key.
Alias without anchor BAD_ALIAS
An *alias must refer to an &anchor defined earlier in the same document.
Problem
a: *base
base: &base 1
Fixed
base: &base 1
a: *base
Fix: Define the anchor before the alias, or fix the name.
Unresolved tag or scalar TAG_RESOLVE_FAILED
A tag (such as !Ref or !!python/object) is not part of the selected schema, or under the JSON schema profile a plain scalar matches no JSON type. ValidateYAML never runs constructors: unknown tags stay inert data.
Problem
x: !Ref Bucket
Fix: Expected for CloudFormation/Ansible-style tags. Choose how tags are projected for schema validation in the projection settings.
Bad directive BAD_DIRECTIVE
A %YAML or %TAG directive is malformed or appears in the wrong place (directives must come before ---).
Fix: Fix or remove the directive.
Several anchors on one node MULTIPLE_ANCHORS
A node can carry at most one &anchor.
Fix: Keep one anchor.
Several tags on one node MULTIPLE_TAGS
A node can carry at most one !tag.
Fix: Keep one tag.
Implicit key too long KEY_OVER_1024_CHARS
Implicit keys are limited to 1024 characters by the YAML spec.
Inside [ ] or { } you cannot start an indented block collection.
Fix: Use flow syntax throughout, or convert to block style.
Anchor/tag in wrong order BAD_PROP_ORDER
Properties (anchor, tag) must come before the node content.
Fix: Move &anchor / !tag before the value.
Alias with anchor or tag ALIAS_PROPS
An alias cannot carry its own anchor or tag.
Fix: Remove the property from the alias.
Collection tag mismatch BAD_COLLECTION_TYPE
A collection tag is applied to the wrong kind of collection.
Fix: Use a tag that matches mapping vs sequence.
Safety findings
Checks for constructs that are dangerous or ambiguous for other tools, even when the YAML grammar allows them.
Language constructor tag unsafe-tag
Tags like !!python/object/apply or !ruby/object instruct some unsafe loaders to construct objects or call functions — a known code-execution vector. ValidateYAML never constructs them; they are reported so you can remove them before another tool loads the file.
Problem
x: !!python/object/apply:os.system ["id"]
Fixed
x: id
Fix: Remove the tag. Load YAML with safe loaders only.
Cyclic alias cyclic-alias
An alias refers to one of its own ancestors. YAML graphs can be cyclic; JSON values cannot, so schema and custom rules cannot assess this document.
Fix: Break the cycle if the consumer expects a tree.
Alias expansion bomb alias-bomb
Nested aliases can expand exponentially ("billion laughs"). Expansion was bounded and stopped; this document is treated as unsafe to process further.
Fix: Remove the repeated alias nesting.
%YAML directive overrides the profile yaml-directive
A %YAML 1.1 or 1.2 directive switches scalar resolution for that document. The parser obeys it, so the effective version differs from your selected profile.
Fix: Pick the matching profile, or remove the directive if it is stale.
Encoding findings
Invalid UTF-8 invalid-utf8
Bytes in the file are not valid UTF-8 (often Latin-1/Windows-1252 text). The display uses replacement characters; the original bytes are kept and can be downloaded unchanged.
Fix: Re-save the file as UTF-8 in your editor.
Byte order mark bom
The file starts with a BOM. YAML 1.2 allows it, but some older tools treat it as content.
Fix: Save the file as UTF-8 without BOM if a consumer complains.
Non-printable character control-char
YAML streams may only contain printable characters (plus tab, LF, CR). Control characters often come from copy-paste or binary data.
Fix: Delete the character or escape it inside a double-quoted string (e.g. "\x07").
BOM inside text inner-bom
U+FEFF in the middle of the stream is not allowed outside quoted content.
Fix: Delete it (safe fix available).
UTF-32 not decoded utf32-unsupported
YAML permits UTF-32, but browsers do not ship a UTF-32 decoder, so the file was not parsed. This is an UNSUPPORTED result, not a pass.
Fix: Convert to UTF-8.
YAML-to-JSON projection
Why the schema layer sometimes refuses to run instead of validating altered data.
Non-string key mapped for schema validation projection-keymap
JSON Schema only knows string property names. This key resolves to a number/boolean/null in YAML, so it was explicitly converted to its string form before schema validation. The source is unchanged.
Fix: Quote the key if a string was intended, or set "Non-string keys" to "stop" to refuse the conversion.
NaN or Infinity projection-float
.nan and .inf are valid YAML floats but have no JSON representation, so validating this document with JSON Schema would silently alter it.
Fix: Use a string or a finite number if the consumer is JSON-based.
Keys collide after projection projection-collision
Two YAML keys (duplicates, or e.g. 1 and "1") become the same JSON property. Validating one would hide the other.
Fix: Make the keys unique.
Tagged value: schema not run projection-tag
Projection policy is "stop" for unknown tags.
Fix: Allow projection of the underlying value, or remove the tag.
JSON Schema violations
Missing required property schema-required
The schema lists this property under "required" for the object at this path.
Problem
services:
web:
ports: ["80:80"]
Fixed
services:
web:
image: nginx:1.27
ports: ["80:80"]
Fix: Add the property, or use a schema that does not require it.
Wrong type schema-type
The value resolved to a different JSON type than the schema allows. Remember that YAML resolution depends on the profile: 8080 is an integer, "8080" a string, yes may be a boolean (1.1) or a string (1.2).
Problem
replicas: "3"
Fixed
replicas: 3
Fix: Change the value or quote/unquote it.
Value not in allowed list schema-enum
The schema lists the only allowed values.
Fix: Use one of the listed values (case-sensitive).
Value must be exactly a constant schema-const
The schema requires one exact value.
Problem
kind: deployment
Fixed
kind: Deployment
Fix: Use the exact value (case-sensitive).
Property not allowed schema-additionalProperties
The object does not allow properties beyond those it declares. Often a typo (imgae) or a key at the wrong indentation level.
Fix: Fix the spelling or the indentation, or remove the key.
Property not allowed schema-unevaluatedProperties
No subschema evaluated this property and unevaluatedProperties forbids extras.
Fix: Fix the spelling or remove the key.
Does not match pattern schema-pattern
The string must match a regular expression (ECMAScript, Unicode mode).
Fix: Adjust the value to the expected format.
Number too small schema-minimum
The number is below the allowed minimum.
Fix: Use a larger value.
Number too large schema-maximum
The number exceeds the allowed maximum.
Fix: Use a smaller value.
Too few items schema-minItems
The list must contain more items.
Fix: Add items.
Too many items schema-maxItems
The list contains more items than allowed.
Fix: Remove items.
String too short schema-minLength
The string is shorter than allowed (counted in Unicode code points).
Fix: Lengthen the value.
String too long schema-maxLength
The string is longer than allowed.
Fix: Shorten the value.
No alternative matched schema-anyOf
The value must satisfy at least one of several alternative shapes, and it satisfied none.
Fix: Compare the value with each alternative in the schema.
Must match exactly one alternative schema-oneOf
The value matched none, or more than one, of the alternatives. (In the GitHub Actions pack: a step needs exactly one of uses/run.)
Fix: Make the value fit exactly one alternative.
Property name not allowed schema-propertyNames
A key does not satisfy the schema for property names (often a naming pattern).
Fix: Rename the key.
Duplicate list items schema-uniqueItems
All items in this list must be distinct.
Fix: Remove the duplicate.
Format mismatch schema-format
The string does not match the declared format. This engine asserts formats it implements (date-time, email, uri, ipv4, …).
Fix: Correct the value.
Nothing allowed here schema-false
The schema at this location is `false`, which rejects every value.
Fix: Remove the value.
Too few properties schema-minProperties
The mapping must contain more keys.
Fix: Add the expected keys.
Not a multiple schema-multipleOf
The number must be a multiple of the given value.
Fix: Adjust the number.
Lint and portability rules
Reported in their own layer; never counted as syntax errors.
Trailing spaces trailing-spaces
Spaces or tabs at the end of a line. Invisible noise that causes diff churn; inside block scalars they can change string values.
Problem
name: api
Fixed
name: api
Fix: Remove trailing whitespace on the line.
Line length line-length
Lines longer than the configured limit (default 120 UTF-16 code units).
Problem
description: a very long line …
Fixed
description: >-
folded across
several lines
Fix: Edit as in the example, or change the rule severity on the Rules page.
Final newline final-newline
File does not end with a newline. POSIX tools and many diff viewers flag this.
Problem
a: 1⏎b: 2
Fixed
a: 1⏎b: 2⏎
Fix: Append a newline.
Mixed line endings mixed-line-endings
Both CRLF and LF line breaks are present.
Problem
a: 1\r\nb: 2\n
Fixed
a: 1\nb: 2\n
Fix: Normalise every line ending to LF.
Indentation steps indentation-steps
Nested block lines use more than one indentation step size (e.g. 2 and 4 spaces). Valid YAML, but hard to read.
Problem
a:
b:
c: 1
Fixed
a:
b:
c: 1
Fix: Edit as in the example, or change the rule severity on the Rules page.
Document start marker document-start
First document has no explicit --- marker. Some teams require it.
Plain scalars such as yes, no, on, off, y, n are booleans in YAML 1.1 but strings in YAML 1.2. Tools on different versions read different data (the "Norway problem": country: no).
Problem
country: no
Fixed
country: "no" # or false, if a boolean is meant
Fix: Quote the value to keep it a string under every YAML version.
Leading-zero numbers octal-ambiguity
Plain numbers with a leading zero (0755) are octal in YAML 1.1 and decimal in YAML 1.2 core.
Problem
mode: 0755
Fixed
mode: 0o755 # YAML 1.2 octal, or quote it
Fix: Edit as in the example, or change the rule severity on the Rules page.
Base-60 numbers sexagesimal-ambiguity
Values such as 1:30 or 22:22 are base-60 integers in YAML 1.1 (90, 1342) and strings in YAML 1.2. Classic port-mapping trap.
Problem
ports: [22:22]
Fixed
ports: ["22:22"]
Fix: Quote the value.
Other version-dependent scalars profile-divergence
Any other plain scalar that resolves to a different type or value under YAML 1.1 vs 1.2 (e.g. 1_000, timestamps, .5).
Problem
size: 1_000
Fixed
size: 1000
Fix: Edit as in the example, or change the rule severity on the Rules page.
Merge key under YAML 1.2 merge-key-profile
<< is a merge key only in YAML 1.1 (or with merge keys enabled). Under 1.2 core it is a plain key literally named "<<".
Problem
<<: *defaults # with YAML 1.2 profile
Fixed
Enable merge keys in the profile if your consumer supports them.
Fix: Edit as in the example, or change the rule severity on the Rules page.
Implicit null values empty-value
A mapping key with no value resolves to null. Often an editing accident.
Problem
image:
Fixed
image: nginx:1.27 # or image: null if intended
Fix: Edit as in the example, or change the rule severity on the Rules page.
Unused anchor anchor-unused
An &anchor is defined but never referenced by an *alias.
Problem
base: &base {a: 1}
Fixed
base: {a: 1}
Fix: Remove the unused anchor.
Redefined anchor anchor-redefined
The same anchor name is defined twice; later aliases silently refer to the newest definition.
Problem
a: &x 1
b: &x 2
Fixed
a: &x1 1
b: &x2 2
Fix: Edit as in the example, or change the rule severity on the Rules page.
Non-string keys non-string-key
Mapping keys that resolve to numbers, booleans or null. JSON, many config loaders and JSON Schema need string keys.
Problem
200: OK
true: x
Fixed
"200": OK
Fix: Edit as in the example, or change the rule severity on the Rules page.
Possible secret secret-hint
Heuristic patterns for credentials (AWS keys, private key blocks, GitHub/Slack tokens, password-like keys with literal values). False positives and false negatives are expected; this is a hint, not a secret scanner. Nothing leaves your browser.
Problem
password: hunter2
Fixed
password: ${DB_PASSWORD}
Fix: Edit as in the example, or change the rule severity on the Rules page.
Questions
Why does the error point to the next line?
Many YAML errors are only detectable when the parser reaches the following token — e.g. a missing colon becomes visible when the next key starts. Check the line above the reported position too.
Why does my file parse here but fail elsewhere?
Different tools use different YAML versions and options. Compare profiles (1.1 vs 1.2), duplicate-key handling and merge-key support. Our report records exactly which ones were used.