Skip to main content

YAML Linter - Online YAML Validator & Syntax Checker

Free online YAML linter and validator. Check YAML syntax, validate Kubernetes manifests, and debug CI/CD pipeline configs. 100% client-side - your YAML never leaves your browser.

Idle - No YAML linted yet
0 lines 0 document(s)
Lint results will appear here after you run the linter.

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?
#

FeatureDescription
100% Client-SideYour YAML never leaves the browser
Kubernetes ProfileBasic structural checks for common K8s resources
Fast FeedbackAuto-lint as you type or paste manifests
JSON PreviewInstantly see how your YAML parses into data
Multiple ErrorsSurfaces 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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Wrong - mixed indentation
spec:
  containers:
    - name: app
       image: nginx  # Extra space causes error

# Correct
spec:
  containers:
    - name: app
      image: nginx

Missing Colons or Quotes
#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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
#

1
2
3
4
5
6
7
8
9
# Wrong - duplicate keys
metadata:
  name: first
  name: second  # Will overwrite first

# Correct - use unique keys
metadata:
  name: my-app
  namespace: default

Typical Use Cases
#

Kubernetes Manifests
#

Validate Deployments, Services, ConfigMaps, and other K8s resources before applying:

1
2
3
4
# Instead of discovering errors at apply time
kubectl apply -f deployment.yaml

# Lint first with this tool, then apply

Helm Chart Values
#

Check values.yaml and override files for syntax errors before helm install:

1
2
3
4
5
6
# values.yaml
replicaCount: 3
image:
  repository: nginx
  tag: "1.21"
  pullPolicy: IfNotPresent

CI/CD Pipelines
#

Validate GitHub Actions, GitLab CI, Azure Pipelines, and other CI/CD configs:

1
2
3
4
5
6
7
8
9
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm test

Application Configuration
#

Lint application configs like Docker Compose, Ansible playbooks, or custom YAML:

1
2
3
4
5
6
# 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 apiVersion and kind are present
  • Checks for metadata.name on all resources
  • Validates spec.template.spec.containers for Deployments/StatefulSets/DaemonSets
  • Warns about missing spec.selector.matchLabels
  • Checks Service spec.ports and optional spec.selector
Limitations

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: