Online YAML Editor - Kubernetes & GitHub Workflows Validator

Free online YAML editor with built-in schema validation for Kubernetes and GitHub Workflows. Includes multi-document support, syntax highlighting, and JSON conversion.

Loading editor...

Features

Multi-document Support

Edit and validate multiple YAML documents in a single file

Schema Validation

Built-in schemas for Kubernetes and GitHub Workflows

Real-time Syntax Validation

Instant error detection and syntax highlighting

Smart Formatting

Auto-indentation and one-click YAML formatting

Interactive Tree View

Navigate and edit complex YAML structures visually

Format Conversion

Convert between YAML, JSON, and other formats

Template Library

Ready-to-use templates for common YAML configurations

Frequently Asked Questions

What are YAML data types and how to use them?

YAML supports various data types and structures:

# Scalars (strings, numbers, booleans)
string_plain: Hello World
string_quotes: "Hello World"
number_int: 42
number_float: 3.14159
boolean: true
null_value: null

# Multi-line strings
description: |
  This is a long text
  that spans multiple lines
  with preserved newlines

folded: >
  This is a long text
  that will be folded
  into a single line

# Lists (sequences)
simple_list:
  - item1
  - item2
  - item3

nested_list:
  - name: first
    value: 1
  - name: second
    value: 2

Our editor provides syntax highlighting and validation for all YAML data types.

How do I validate Kubernetes YAML configurations?

Our editor includes built-in Kubernetes schema validation:

# Deployment with resource limits
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: "1"
            memory: "512Mi"
          requests:
            cpu: "0.5"
            memory: "256Mi"

The editor validates:

  • Resource types and versions
  • Required fields
  • Field types and formats
  • Resource limits and requests
  • Label selectors and references
How to work with multiple YAML documents?

Use document separators (---) to combine related configs:

# ConfigMap for application settings
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  database_url: "postgresql://db:5432"
  api_key: "development-key"
---
# Service for the application
apiVersion: v1
kind: Service
metadata:
  name: app-service
spec:
  selector:
    app: myapp
  ports:
  - port: 80
---
# Deployment using the ConfigMap
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-deployment
spec:
  template:
    spec:
      containers:
      - name: app
        envFrom:
        - configMapRef:
            name: app-config

Features:

  • Individual validation per document
  • Cross-document reference checking
  • Document outline navigation
  • Collapse/expand documents
What schema validations are supported?

The editor supports two types of schema validation:

1. Kubernetes Resources

apiVersion: v1
kind: Service
metadata:
  name: my-service
  namespace: default
spec:
  selector:
    app: my-app
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9376

2. GitHub Workflows

name: CI/CD Pipeline
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup Node.js
      uses: actions/setup-node@v2
      with:
        node-version: '14'
    - run: npm ci
    - run: npm test

The editor automatically detects and applies the appropriate schema based on the YAML content. It provides:

  • Resource validation
  • Field type checking
  • Required field validation
  • Action/step validation for workflows
  • Syntax highlighting specific to each schema
How to handle anchors and aliases in YAML?

YAML anchors (&) and aliases (*) help reduce repetition:

# Define common configurations
definitions:
  - &java_container
    image: openjdk:11
    environment: &java_env
      JAVA_OPTS: -Xmx512m
      APP_ENV: prod

# Use the configurations
services:
  api1:
    <<: *java_container    # Merge java_container
    environment:
      <<: *java_env        # Merge java_env
      API_PORT: 8080

  api2:
    <<: *java_container
    environment:
      <<: *java_env
      API_PORT: 8081

Features:

  • Syntax highlighting for anchors/aliases
  • Validation of references
  • Auto-completion for defined anchors
  • Preview of resolved values
How to troubleshoot common YAML errors?

Common YAML issues and solutions:

# 1. Indentation Errors
correct:
  nested:
    key: value    # Consistent 2-space indent

wrong:
   nested:        # ❌ Inconsistent indent
  key: value     # ❌ Wrong level

# 2. Quote Issues
correct_quotes:
  simple: Hello World
  special: "Hello: World"
  multiline: |
    Line 1
    Line 2

# 3. Array Formatting
correct_arrays:
  - item1
  - item2
  - key: value
    other: value

# 4. Boolean Values
correct_booleans:
  - true    # Not True
  - false   # Not False
  - yes     # Alternative
  - no      # Alternative

The editor provides:

  • Real-time error detection
  • Detailed error messages
  • Quick fixes for common issues
  • Format on paste/save options