YAML Linter - Online YAML Validator & Syntax Checker

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.

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.

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

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: nginx
# 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}"
# Wrong - duplicate keys
metadata:
  name: first
  name: second  # Will overwrite first

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

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 apply

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

# values.yaml
replicaCount: 3
image:
  repository: nginx
  tag: "1.21"
  pullPolicy: IfNotPresent

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 test

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

# docker-compose.yml
services:
  web:
    image: nginx
    ports:
      - "80:80"

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

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

Explore our other DevOps tools:


Need help? All code is open-source. Visit our GitHub or contact us with questions or feedback.