Skip to content

JSON ↔ YAML Converter

Convert between JSON and YAML instantly. Paste JSON to get clean YAML, or paste YAML to get formatted JSON. Configurable indentation. Free, 100% in your browser.

What are JSON and YAML?

JSON (JavaScript Object Notation) is a lightweight data-interchange format that uses key-value pairs, arrays, strings, numbers, booleans, and null. It is the dominant format for APIs, configuration files, and data storage. YAML (YAML Ain't Markup Language) is a human-readable data serialization format that uses indentation instead of braces/brackets. YAML is a superset of JSON — any valid JSON is also valid YAML. YAML is widely used for configuration files (Docker Compose, Kubernetes, GitHub Actions, Ansible).

JSON vs YAML — syntax comparison

JSON uses curly braces {} for objects, square brackets [] for arrays, and requires double-quoted strings. Keys must be quoted. No comments allowed.
YAML uses indentation for nesting, - for array items, and key: value for mappings. Strings are usually unquoted. Supports comments with #. Supports multi-line strings with | (literal) and > (folded) block scalars.
Example: {"name": "Alice", "age": 30} in JSON becomes name: Alice\nage: 30 in YAML.

When to convert between JSON and YAML

DevOps configuration — convert JSON API responses to YAML for Kubernetes manifests, Docker Compose files, or Ansible playbooks. CI/CD pipelines — GitHub Actions, GitLab CI, and CircleCI all use YAML; convert JSON data structures to YAML for pipeline configs. API development — convert YAML OpenAPI/Swagger specs to JSON for programmatic processing. Configuration migration — when switching between tools that prefer different formats (e.g., moving from a JSON config to a YAML-based tool).

Privacy

All conversion runs 100% in your browser. No data is sent to any server.