Free · Local processing · No account

YAML Validator

Check YAML configuration syntax, spot indentation mistakes and find duplicate keys. Your input stays on this device.

Ready. Processing stays in this browser.

No uploads or saved history. Files are read on your device. Ctrl or Command + Enter runs the tool. Editing input clears outdated output.

How to use the YAML Validator

  1. Paste a YAML document or choose a UTF-8 .yaml or .yml file.
  2. Select Validate YAML, or press Ctrl or Command + Enter.
  3. Correct the reported line and column, then validate again. Valid results show node, nesting and alias counts.

This validator reports syntax and document metrics rather than generating a replacement file. Keep your original configuration and clear the page when working on a shared device.

Supported data and limits

This validator uses the YAML 1.2 core schema. It checks one document at a time and rejects duplicate mapping keys, unknown tags, YAML 1.1 directives and non-core custom types. A date such as 2026-10-18 remains a string.

Anchors and up to 100 aliases are checked without expanding their values. This avoids alias expansion attacks. Input is limited to 5 MiB of UTF-8 text, 100 nested levels, 200,000 nodes and 1,000 leading spaces. A local worker stops after 15 seconds. These are processing limits, not YAML language rules.

Frequently asked questions

Does valid YAML mean my app configuration is correct?

No. This checks YAML syntax and the supported schema. It cannot check the application-specific options required by Docker, Kubernetes, GitHub Actions or another service. Validate those rules with the application too.

Why are duplicate keys rejected?

A repeated mapping key can cause different programs to keep different values. Rename or remove the duplicate instead of relying on an ambiguous result.

Are tabs allowed for indentation?

YAML block indentation uses spaces. A tab within a quoted string is data, but a tab used to indent a mapping can cause a syntax error.

Can I validate multiple YAML documents at once?

This tool accepts one document. Split a stream containing multiple document markers into individual documents before validating.

YAML support and privacy

YAML parsing uses a self-hosted copy of the open-source yaml library. No library is downloaded from a third-party server while you use this page. Custom executable tags are not loaded, and input is never executed.

YAML library documentation explains the YAML 1.2 core schema and document model.

Processing runs in a local browser worker when supported. You can cancel long operations. No database or server processing is used for the text you enter.

Worked example: catch a duplicate before deployment

Paste the first snippet and validate it. Both entries use the mapping key port, so this tool rejects the document instead of choosing one value. The reported line and column identify the repeated key; inspect the earlier occurrence as well before deciding which setting is intended.

Rejected: the same key appears twice
server:
  port: 8080
  port: 9090
Accepted syntax after choosing one port
server:
  port: 8080
  enabled: true

The corrected example is valid YAML under this tool's supported rules. That does not establish that an application recognizes server, permits port 8080 or can start on your device. Use its schema validator or documented configuration check after the syntax check.

Indentation and scalar values to inspect

Use spaces consistently for block indentation. A nested key needs more indentation than its parent, while sibling keys line up. When a value contains a colon followed by a space or a comment marker that should be literal, quote it. For example, message: "Status: ready #1" keeps that punctuation inside the value rather than asking the parser to interpret it as structure or a comment.

Be deliberate about types. Under YAML 1.2 core rules, true is a boolean; quoting it makes it a string. Values such as on and off remain strings here, unlike some older YAML 1.1 interpretations. Check the parser and schema used by the receiving application before relying on an implicit type.

After the document validates

Keep its original file, test the application's own settings and compare any converted output. If you need JSON, use JSON ↔ YAML Converter; JSON has fewer representable constructs, so a syntactically valid YAML document can still be unsuitable for conversion. The number-precision guide shows why a successful parse alone is not enough to protect large identifiers.

Examples and practical checks

Understand the result before using it elsewhere.