YAML Linter - Online YAML Validator & Syntax Checker
About This Linter
This linter validates YAML syntax and structure using js-yaml.
The Kubernetes profile adds lightweight structural hints only; it does not replace full schema validation.
All processing happens entirely in your browser - no data is sent to any server.
What is a YAML Linter?
A YAML linter is a tool that scans your YAML configuration files for syntax errors, invalid indentation, and structural issues before they cause runtime failures. YAML is whitespace-sensitive, so a single misplaced space can break a Kubernetes deployment or CI/CD pipeline.
Why Use This YAML Linter?
| Feature | Description |
|---|---|
| 100% Client-Side | Your YAML never leaves the browser |
| Kubernetes Profile | Basic structural checks for common K8s resources |
| Fast Feedback | Auto-lint as you type or paste manifests |
| JSON Preview | Instantly see how your YAML parses into data |
| Multiple Errors | Surfaces several issues in one pass |
Common YAML Syntax Errors
Indentation Issues
YAML uses spaces for indentation (not tabs). Inconsistent indentation is the most common error:
# Wrong - mixed indentation
spec:
containers:
- name: app
image: nginx # Extra space causes error
# Correct
spec:
containers:
- name: app
image: nginxMissing Colons or Quotes
# Wrong - missing colon
metadata
name: my-app
# Wrong - unquoted special characters
env:
value: ${VAR} # Should be quoted
# Correct
metadata:
name: my-app
env:
value: "${VAR}"Duplicate Keys
# Wrong - duplicate keys
metadata:
name: first
name: second # Will overwrite first
# Correct - use unique keys
metadata:
name: my-app
namespace: defaultTypical Use Cases
Kubernetes Manifests
Validate Deployments, Services, ConfigMaps, and other K8s resources before applying:
# Instead of discovering errors at apply time
kubectl apply -f deployment.yaml
# Lint first with this tool, then applyHelm Chart Values
Check values.yaml and override files for syntax errors before helm install:
# values.yaml
replicaCount: 3
image:
repository: nginx
tag: "1.21"
pullPolicy: IfNotPresentCI/CD Pipelines
Validate GitHub Actions, GitLab CI, Azure Pipelines, and other CI/CD configs:
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm testApplication Configuration
Lint application configs like Docker Compose, Ansible playbooks, or custom YAML:
# docker-compose.yml
services:
web:
image: nginx
ports:
- "80:80"Kubernetes Profile Checks
When using the Kubernetes manifest profile, the linter performs additional structural checks:
- Verifies
apiVersionandkindare present - Checks for
metadata.nameon all resources - Validates
spec.template.spec.containersfor Deployments/StatefulSets/DaemonSets - Warns about missing
spec.selector.matchLabels - Checks Service
spec.portsand optionalspec.selector
The Kubernetes profile provides basic static checks only. It does not replace:
- Full Kubernetes schema validation
- Admission controller policies
- Testing in a real cluster
Privacy & Security
All processing happens directly in your browser:
- No Server Communication: Your YAML data never leaves your device
- No Storage: Nothing is saved to localStorage, cookies, or servers
- Open Source: All code is transparent and auditable
Related Tools
Explore our other DevOps tools:
- JSON Linter - Validate JSON syntax and structure
- YAML/JSON Path Tester - Test JSONPath expressions
- kubectl Builder - Visual kubectl command builder
- JWT Tools - Decode and create JSON Web Tokens
Need help? All code is open-source. Visit our GitHub or contact us with questions or feedback.