YAML Validator
Validate YAML syntax, format YAML, and inspect Docker Compose services for config, CI, and documentation files.
Runs in your browserNothing you type is sent to a server.
Input and result
What you type is kept in this browser only. Reopen to restore your last run.
Use cases
- Validate YAML syntax before committing config files.
- Inspect Docker Compose services, images, ports, volumes, environment, and dependencies.
- Format parsed YAML into copy-ready output after reviewing warnings.
Examples
- Common input
name: Bob active: true- Validate YAML syntax, inspect Docker Compose service shape, and format YAML before conversion or commit.
- Typical output
Valid YAML with parsed JSON preview, formatted YAML, and Docker Compose diagnostics- Use this as a quick sanity check before copying results.
- Compose service
services: web: image: nginx ports: - "8080:80"- Checks service, image, and port structure, then prepares a copyable deployment report before handoff.
- Nested config
app: features: login: true audit: false- Shows how indentation changes the parsed object shape.
Common mistakes
- Indentation can look aligned in a copied config while the parsed object nests keys under the wrong parent.
- YAML accepts unquoted values such as yes, no, on, and off differently across tooling versions.
- A file can be syntactically valid YAML while still missing fields required by CI, Docker, Kubernetes, or app config.
Before you copy
- 1Validate the small pasted block before committing the full config file.
- 2Preview the parsed JSON shape and check arrays, nested maps, booleans, and null values.
- 3Continue to YAML JSON Converter or JSON Schema Validator when the config needs conversion or structural checks.
Sources
The YAML 1.2.2 specification says tab characters must not be used in indentation, because systems treat tabs differently. The parser here rejects tab indentation, and the tool adds a separate warning whenever a tab appears anywhere.
Basis: YAML 1.2.2 (2021)
yes and no are not booleans in YAML 1.2
YAML 1.2's Core schema resolves only true and false (in their case variants) as booleans; reading yes, no, on and off as booleans was YAML 1.1. This tool follows 1.2 and keeps yes as a string, but a 1.1 tool reads the same line as true, hence the warning to quote it.
Basis: YAML 1.2.2 (2021)
A Compose service needs an image or a build
In the Compose specification a service is defined by a Docker image and runtime arguments, and a build section can say how to create that image. So the tool warns when a service has neither, and when depends_on names a service that does not exist.
Basis: Docker Docs, Compose file reference
FAQ
Does YAML Validator upload my input?
No. This tool runs in your browser unless the privacy badge explicitly says a server route is required.
Can I use this for production secrets?
Avoid pasting sensitive production data into any website. Prefer local test data or redacted payloads.
Can YAML be valid but still wrong?
Yes. Syntax can pass while required service fields, config keys, or runtime-specific values are missing.
Why include Docker Compose diagnostics here?
Compose files are YAML, but deployment review also needs services, images, build paths, ports, volumes, environment, dependencies, and a shareable report that avoids raw environment values.