Check YAML syntax with exact line and column, lint common pitfalls, and convert to JSON. Runs in your browser.
Tab inserts two spaces (Shift+Tab removes them). To leave the editor with the keyboard, press Esc and then Tab. You can also drop a .yml, .yaml or .txt file here (max 1 MB). Your YAML never leaves your browser.
Validates as you type. Ctrl+Enter validates right away.
Lint findings do not change whether the YAML is valid; the banner above shows the parser result. Findings marked "heuristic" are pattern-based suggestions and can be wrong.
This YAML validator checks your YAML syntax online and reports the exact line and column of every error. Paste text, drop a .yml file or load a sample, then review lint warnings and view the result as formatted YAML, JSON or a tree. It is free and needs no sign-in.
YAML is a human-readable data format built from indentation, key-value pairs and lists. It appears in Kubernetes manifests, Docker Compose files, GitHub Actions workflows, CI settings and the frontmatter at the top of Markdown posts. Validating YAML means parsing it the way a real parser would and confirming the text follows the grammar.
Two things trip people up. YAML uses spaces for structure, so one misplaced space can break a file or quietly change its meaning. There are also several versions of the spec. YAML 1.2 is what modern parsers follow, while older tools such as PyYAML and Go yaml.v2 follow YAML 1.1, which reads values like yes, no, on and off as booleans. A file can be valid in both and still mean different things.
Say your Compose file has ports: indented three spaces under a service whose other keys use four. The banner turns red and the error points to that line and column, because the key no longer lines up with its siblings. Fix the indent to match, and the banner turns valid.
Now try this input: enabled: yes and mode: 0755. Under YAML 1.1, yes becomes the boolean true and 0755 is read as an octal number (493 in decimal). Under YAML 1.2 Core, yes stays a plain string and 0755 is no longer treated as octal. Check the JSON tab under each schema and you will see the difference. If a Python or Go app reads this file, quote the values ("yes", "0755") so every parser agrees.
Errors mean the parser could not read the file; warnings and info are lint suggestions that point at common pitfalls. Lint findings never change whether the YAML is valid. The banner always reflects the parser result alone.
Findings marked heuristic are pattern-based guesses and can be wrong, so treat them as prompts to look, not orders. Start with errors, since the parser stops at the first structural problem and later errors can disappear once you fix it. Then scan warnings for items such as duplicate keys, tab characters or values an older parser would read differently.
| What you see | Likely cause | Fix |
|---|---|---|
| Error at a line and column | Bad indent or missing colon | Align with sibling keys |
| Tab warning | Tab used for indentation | Replace with spaces |
| Duplicate key | Same key twice in one map | Merge or rename |
| Value changes type | yes, no, on, off or 0755 | Quote the value |
The schema controls how plain values are typed. Core is the modern default. The JSON schema is stricter about types. Failsafe treats every value as a string. YAML 1.1 mimics older parsers. This setting is about value types, not about checking your data against a custom JSON Schema.
Allow duplicate keys (last one wins) relaxes the duplicate check, which some tools tolerate. Allow custom tags accepts tags such as !Ref, !Sub, !reference and !include, which CloudFormation, GitLab CI and similar formats rely on. Turn it on when you see tag errors in files that work fine in their own ecosystem.
With this option on, the tool recognizes common file types and adds checks for them. A manifest with apiVersion and kind is checked as a Kubernetes resource, for example. These are suggestions layered on top of syntax validation.
For the formatted YAML, choose 2 or 4 spaces, an 80 or 120 character line width or no wrapping, and optionally sort keys alphabetically, quote all strings, expand anchors and aliases, or keep lists at the same column as their key. When a file has several documents separated by ---, the Documents setting can combine all of them into one array.
If you only need to convert between the two formats, the YAML and JSON converter is built for that. For the JSON you produce, the JSON formatter and validator is the natural next step.
1.10, country codes like NO, and file modes should be quoted so they stay strings.note: see: below needs quotes.A valid result means the syntax parses, not that your application will accept the content. The tool does not know your app's required fields or your custom JSON Schema, and its Kubernetes, Compose and Actions checks cover common mistakes rather than every rule. Heuristic lint findings can be false alarms. Very large documents may show only part of the Tree view, although the formatted YAML and JSON tabs remain available.
Paste your file into the box above to see exactly where it breaks, which schema reads it differently, and what the clean version looks like. For more utilities like this one, browse the web developer tools collection.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market