YAML Validator: Check YAML syntax online
Use the YAML Validator to check files such as docker-compose.yml, Kubernetes manifests, or CI workflows for syntax errors online. The tool shows errors with line and column numbers and outputs valid YAML with normalized formatting or as JSON, even for multiple documents separated by ---.
Built by Jakub Martyniak
Free, with no sign-up required—your YAML is checked only in your browser and is not uploaded.
Deploying a Kubernetes manifest? Run your containers with full root access.
Input
Result
Paste YAML on the left to see a preview.
Example result
What the result looks like in the YAML Validator
You paste YAML, and the tool reports syntax errors with their line and column or outputs valid YAML in normalized form or as JSON. The two examples below are fixed sample files; your result depends on your file.
Example · Validate and convert to JSON
Input: line 2 indented with a tab
server: name: zapOutput: findings
- 1 error
Error · Line 2, column 1Tabs are not allowed as indentation
YAML only allows spaces for indentation. Replacing the tab with two spaces makes the file valid.
Input: valid YAML
server: name: zap port: 25565 tags: - eu - ddosOutput: JSON
{ "server": { "name": "zap", "port": 25565, "tags": [ "eu", "ddos" ] }}How it works
How to check YAML online with the YAML Validator
Five steps from pasted YAML to a validated file or JSON.
Step 1
Paste YAML
Paste your YAML into the input field, open a .yaml or .yml file using “Choose file”, or start with “Load example”.
Step 2
Select mode
Select “Validate” or “Convert to JSON” above. For JSON, choose the indentation: 2 spaces, 4 spaces, or tabs.
Step 3
Read result
Validation runs automatically as you type. In “Validate” mode, the right side shows “Valid YAML.” or a list of errors with line and column numbers and, for multiple documents, the document number.
Step 4
Fix error
Fix the reported issues in the input field. The result updates with every change.
Step 5
Copy or download
Copy the normalized YAML or JSON, or download it as validated.yaml or converted.json.
Why this tool
YAML checker and YAML-to-JSON converter in one
Here’s what the YAML Validator can do right in your browser.
Multiple documents in one file
Documents separated by ---, such as Kubernetes manifests, are checked individually. Errors also include the document number.
Errors with line and column numbers
Syntax errors appear with a message and, where the parser can determine the location, a line and column number. Up to 200 errors are listed individually.
Detect duplicate keys
If a key appears twice in one mapping, the tool reports it as an error with its position.
Convert YAML to JSON
In the “Convert to JSON” tab, valid YAML is converted to JSON with 2 spaces, 4 spaces, or tabs for indentation. Download it as converted.json.
Normalized output with comments
Valid YAML is displayed with updated indentation, and comments are preserved. Copy the result or download it as validated.yaml.
Runs only in the browser
Validation and conversion run in your browser, and files are read locally. Your YAML is not uploaded.
Troubleshooting
Common YAML errors and how to fix them
The YAML Validator detects these errors. The error messages themselves come from the YAML library and are in English.
Tab instead of spaces
server:
name: zapYAML only allows spaces for indentation. The tool reports a line indented with a tab, including its line and column number. Replace the tab with spaces.
Duplicate key
server:
port: 25565
port: 25566If the same key appears twice in one mapping, the tool reports “Map keys must be unique” at the second key. Delete or rename one of them.
Unclosed bracket
tags: [eu, ddosA list in square brackets without a closing bracket makes the file invalid. Close the bracket or write the list as hyphen-prefixed items.
Alias without an anchor
app:
image: *baseAn alias such as *base needs an anchor &base defined earlier in the same document. If the anchor is missing or comes later, the tool reports an error.
Basics
What is YAML, and how does it differ from JSON?
YAML files: .yaml and .yml
YAML is an easy-to-read data format for configuration files, such as those used by Docker Compose, Kubernetes, or CI pipelines. Spaces provide indentation to define the structure, values use key: value pairs, list items start with a hyphen, and comments start with #. The .yaml and .yml extensions refer to the same format; the YAML Validator opens both.
YAML or JSON?
JSON uses curly and square brackets instead of indentation and does not support comments. You can convert valid YAML to JSON in the “Convert to JSON” tab: a single document becomes a JSON value directly, while multiple documents separated by --- become a JSON array. Comments are removed.
Discover more
More tools for your configuration files
Compare text online (Diff Checker)
Compare text online: Compare two texts, configs, or code versions, see differences line by line and word by word, and copy them as a Unified Diff. Runs entirely in your browser.
Built by Dimitri Heissler
JSON Formatter
Format, minify, and validate JSON with syntax highlighting, error messages, and downloads, entirely in your browser.
Built by Jakub Martyniak
XML Formatter & Validator
Validate, format, minify, and automatically repair XML (unescaped characters, missing tags, missing declaration)—100% in your browser, without uploading.
Built by Justin Schuessler
Base64 Encoder/Decoder
Encode and decode text in Base64, including a URL-safe variant and clear error messages, entirely in your browser.
Built by Jakub Martyniak
Crontab Generator
Build Cron expressions using a form, with plain-language explanations and a preview of upcoming execution times—all in your browser.
Built by Jakub Martyniak
FAQ
Frequently asked questions about the YAML Validator
Brief answers about YAML and this tool.
Yes. The YAML Validator is free to use without signing up. You need neither an account nor an installation.
No. Validation and conversion run entirely in your browser, and files selected via “Choose file” are read locally. Your YAML is neither sent to a server nor stored. This is useful for configurations containing passwords or tokens.
Paste your YAML into the input field or open a .yaml or .yml file using “Choose file”. Validation runs automatically as you type, without submitting anything. In “Validate” mode, the right side shows “Valid YAML.” or a list of errors with line and column numbers, plus document numbers if there are multiple documents. Up to 200 errors are listed individually; any others are summarized.
YAML only allows spaces for indentation. If a line is indented with a tab, the tool reports “Tabs are not allowed as indentation” with the line and column number—in the example above, line 2, column 1. Replace the tab with spaces to make the file valid.
Yes. Documents separated by --- are checked individually, as is common with Kubernetes manifests. Errors also identify the document they occur in, and the status shows the number of documents when the YAML is valid. A --- at the end of the file does not count as a separate document.
Switch to the “Convert to JSON” tab and choose 2 spaces, 4 spaces, or tabs for indentation. A single document becomes a JSON value; multiple documents become a JSON array. You can copy the JSON or download it as converted.json.
Yes. In “Validate” mode, the tool displays valid YAML with normalized formatting and indentation, while preserving # comments. Your input remains unchanged. Comments are omitted from the JSON output because JSON does not support them.
No. The YAML Validator checks YAML syntax: indentation, structure, duplicate keys, and aliases without a matching anchor. It does not check whether a docker-compose.yml file or Kubernetes manifest contains the correct fields.
Any more questions?
Contact SupportYour app or API needs a reliable server
A ZAP-Hosting VPS reliably puts your application or project online.
No setup. No risk. Online in seconds.
Looking for more tools? View all developer tools
