Skip to content
Devtoolry

YAML Validator

Validate YAML syntax online, find errors by line, and see the parsed result as JSON. Check Kubernetes, Docker Compose and CI files before you deploy.

Runs in your browser · Nothing uploadedFree · No sign-up

Something not working, or missing a feature? Send feedback

About the YAML Validator

The YAML Validator is an online YAML parser: it parses your YAML and shows the result as JSON, so you can see exactly how indentation and special values (dates, booleans, nulls) are interpreted before a deployment fails. Parsing runs in your browser, so configs with secrets stay on your device.

Everything runs in your browser, so your input is never uploaded to a server.

How to use the YAML Validator

  1. Paste YAML or open a file.
  2. Check the parsed JSON for unexpected values.
  3. Fix any error at the reported location.

Examples

See how values are really typed

Input

name: api
replicas: 3
enabled: yes
version: 1.10
port: 08

Result

{
  "name": "api",
  "replicas": 3,
  "enabled": "yes",
  "version": 1.1,
  "port": 8
}

The version 1.10 is read as the number 1.1, and 08 as the number 8. Quote values that must stay text, such as "1.10". With YAML 1.2 rules, yes stays a string.

Locate an indentation error

Input

server:
  host: localhost
 port: 8080

Result

Error: bad indentation of a mapping entry (3:2)

 1 | server:
 2 |   host: localhost
 3 |  port: 8080
------^

The caret points to the line whose indentation does not match its siblings.

Common mistakes

  • Version numbers and ZIP codes. Unquoted 1.10, 3.0 or 01234 are numbers, so they lose zeros. Quote them to keep the exact text.
  • Mixed indentation. All keys of the same mapping must start in the same column. One extra or missing space moves a key into the wrong parent or causes an error.
  • Booleans in other parsers. This validator follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 parsers, such as PyYAML, also read yes, no, on and off as booleans; quote them to be safe everywhere.

Works well with the YAML Validator

Frequently asked questions

Why did "no" become false?

Some YAML versions treat yes/no/on/off as booleans. Quote such values ("no") to keep them as strings.

Are multiple documents supported?

Documents separated by --- are parsed; the result shows how each is interpreted.

Which YAML parser does it use?

js-yaml, the parser behind many JavaScript tools. The JSON output shows exactly what a JavaScript program reading the file would get, which is the quickest way to check how a parser understands your YAML.

Does it validate Kubernetes or Compose schemas?

No. It checks YAML syntax and shows how values are parsed. Field names and required keys are checked by kubectl, docker compose config or a JSON Schema.

Is my file uploaded?

No. Parsing happens in your browser, so secrets in config files stay on your device.

Guides and tutorials