- Paste your raw YAML configuration into the input area.
- Select your desired YAML specification version (e.g., 1.1 or 1.2).
- Choose an optional schema type to enforce strict typing (e.g., Core, JSON, or Failsafe schema).
- Click the 'Lint' button to execute the client-side validation.
- Review the output. If invalid, navigate to the indicated line number to fix syntax or indentation errors.
YAML Linter
YAML Linter tool on AzWebTools.
Result
Fill inputs and click run.
How to Use This Tool
Learn More About YAML Linter
Understanding YAML
YAML is a human-readable data serialization language extensively used for configuration files. Its design prioritizes readability over explicit brackets and braces, relying instead on indentation to denote structure. While this makes YAML incredibly easy to read, it also makes it highly susceptible to formatting errors.
Common YAML Errors to Watch For
- Tabs Instead of Spaces: YAML strictly forbids the use of tabs for indentation. Using a tab will immediately invalidate your document.
- Misaligned Indentation: An array item or nested key that is off by a single space will change the structure of the document or trigger a mapping error.
- Unquoted Strings: In YAML 1.1, unquoted values like
yes,no,on, andoffare automatically parsed as booleans. If you meant to input a string (such as the country code for Norway,NO), it must be enclosed in quotes ("NO"). - Missing Spaces: A space is strictly required after a colon (
:) separating a key and a value, as well as after a hyphen (-) denoting a list item.
Why Use a Client-Side Linter?
Because configuration files often contain sensitive information—such as environment variables, API keys, or infrastructure blueprints—using a pure JavaScript linter ensures your data never leaves your local machine. All validation happens instantly and securely within your browser's memory.
The Origin of YAML
YAML was proposed in 2001 by Clark Evans, in collaboration with Brian Ingerson and Oren Ben-Kiki. The acronym originally stood for 'Yet Another Markup Language' but was later recursively redefined as 'YAML Ain't Markup Language' to emphasize its purpose as a data-centric serialization language rather than a document markup language. Today, it serves as the de facto standard for Infrastructure as Code (IaC), CI/CD pipelines, and application configuration.
YAML was created in 2001 as a human-readable data serialization standard and has since become the backbone of modern configuration management.
- First Release
- 2001
- Original Authors
- Clark Evans, Brian Ingerson, Oren Ben-Kiki
- Primary Extension
- .yaml, .yml
Examples
Basic Valid Config
Runtime-verified example for yaml-linter
Input
{"yamlContent":"server:\n port: 8080\n host: 0.0.0.0\nlogging:\n level: INFO","yamlVersion":"1.2","schema":"core"}Output
{
"yamlContent": "server:\n port: 8080\n host: 0.0.0.0\nlogging:\n level: INFO",
"yamlVersion": "1.2",
"schema": "core"
}Kubernetes Deployment (with error)
Runtime-verified example for yaml-linter
Input
{"yamlContent":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: my-app\nspec:\n replicas: 3\n template:\n metadata:\n labels:\n app: my-app\n spec:\n containers:\n - name: my-app\n image: my-app:1.0.0\n ports: # deliberate indentation error\n - containerPort: 8080","yamlVersion":"1.2","schema":"core"}Output
{
"yamlContent": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: my-app\nspec:\n replicas: 3\n template:\n metadata:\n labels:\n app: my-app\n spec:\n containers:\n - name: my-app\n image: my-app:1.0.0\n ports: # deliberate indentation error\n - containerPort: 8080",
"yamlVersion": "1.2",
"schema": "core"
}Sample Scenario
Runtime-verified example for yaml-linter
Input
{"yamlContent":"name: web-app\nenv: production\nservices:\n - name: api\n port: 3000\n - name: db\n port: 5432","yamlVersion":"1.2","schema":"core"}Output
{
"yamlContent": "name: web-app\nenv: production\nservices:\n - name: api\n port: 3000\n - name: db\n port: 5432",
"yamlVersion": "1.2",
"schema": "core"
}Use Cases
- Validating Kubernetes (K8s) manifests before applying them to a cluster.
- Checking GitHub Actions, GitLab CI, or Bitbucket pipeline configurations for syntax errors.
- Debugging complex Ansible playbooks and Docker Compose files.
- Ensuring application configuration files (such as application.yml) are structurally sound.
- Detecting illegal tab characters to fix 'found character that cannot start any token' errors.