JSON to YAML Converter
Convert JSON to clean, properly-indented YAML using a real YAML serializer.
Paste JSON below - this tool parses it and serializes it as clean, properly-indented YAML.
More File & Data Conversion Tools
View all 20For the reverse direction, see the YAML to JSON Converter.
How to Use It
- Paste valid JSON.
- Click Convert.
- Copy or download the resulting YAML.
Understanding the Result
JSON objects become YAML mappings, arrays become YAML sequences, and primitive types (strings, numbers, booleans, null) are preserved - the output uses standard block-style YAML formatting for readability.
Limitations
YAML supports some features JSON has no equivalent for (anchors/aliases, comments) - since the input is JSON, the output is always plain, comment-free YAML.
Example
{"name":"invoice-kit","port":8080,"debug":false,"version":"1.10","features":["pdf","csv"],"database":{"host":"db.internal","port":5432}}
becomes:
name: invoice-kit
port: 8080
debug: false
version: '1.10'
features:
- pdf
- csv
database:
host: db.internal
port: 5432
Notice '1.10' is quoted: without quotes, YAML would read it as the number 1.1. The serializer adds quotes wherever a string could be misread as another type.
Why Convert JSON to YAML?
- Kubernetes manifests, Docker Compose files, GitHub Actions and GitLab CI all use YAML.
- OpenAPI specs are usually easier to review in YAML.
- Readability: no braces or quotes around every key, and you can add comments afterwards.
Tips
- Validate the JSON first - a single trailing comma stops the conversion. Use the JSON Validator.
- YAML uses spaces for indentation, never tabs; keep that in mind when you edit the result.
- Add comments with
#after converting to document important settings.
Convert back with YAML to JSON. For Kubernetes files, tidy the result with the Kubernetes Manifest Formatter. Read JSON vs YAML vs TOML vs XML for when to use each.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.