YAML to JSON Converter

Paste YAML configuration or data and convert it to pretty-printed JSON instantly.

YAML vs JSON — when to convert

YAML is human-friendly: it uses indentation instead of brackets, supports comments, and reads naturally. It's the default format for Kubernetes configs, GitHub Actions, Docker Compose, and many CI/CD pipelines. JSON is machine-friendly: it's the lingua franca of APIs, configuration schemas, and JavaScript. Converting YAML to JSON is useful when you need to feed configuration data into an API, validate a YAML file against a JSON Schema, or use a tool that only accepts JSON.

What the parser supports

This converter handles the most common YAML features: key-value pairs, nested objects (via indentation), lists (using "- item" syntax), multi-level nesting, quoted strings (single and double), and scalar types — booleans (true/false/yes/no), null (null/~), and numbers. Comments (lines starting with #) are ignored. Advanced YAML features like anchors, aliases, multi-line strings, and custom tags are not supported.

Common use cases

Kubernetes: Convert a Pod or Deployment YAML to JSON for use with kubectl apply or API calls. GitHub Actions: Inspect a workflow file's structure as JSON. Docker Compose: Convert docker-compose.yml to JSON for programmatic processing. OpenAPI: Convert a YAML-format OpenAPI spec to JSON for tools that require it. Testing: Validate config file structure in unit tests that parse JSON.

Indentation matters in YAML

YAML is strictly indentation-sensitive. A single extra or missing space can change the structure of your document. If you get unexpected results, check that nested keys are consistently indented (the parser handles both 2-space and 4-space indentation). Tab characters are not valid YAML indentation — use spaces only. A good YAML linter in your editor will catch most indentation issues before you paste here.