Simple JSON to YAML
A simple conversion showing how JSON key-value pairs translate directly to YAML format.
Switch tool:
Examples:
💡 Paste your JSON and it converts to YAML automatically. Perfect for Kubernetes, Docker Compose, and other DevOps configurations.
Code Examples
Here's how to achieve this in different programming languages:
1// Using js-yaml library (npm install js-yaml)2import yaml from 'js-yaml';34const jsonData = `{"name": "John Doe", "email": "john@example.com", "age": 30, "active": true}`;5const parsed = JSON.parse(jsonData);6const yamlOutput = yaml.dump(parsed);7console.log(yamlOutput);89// Output:10// name: John Doe11// email: john@example.com12// age: 3013// active: true
More JSON Examples
JSON to Kubernetes YAML
Convert JSON deployment configuration to Kubernetes YAML format.
JSON to Docker Compose
Convert JSON service configuration to Docker Compose YAML format.
JSON to GitHub Actions
Convert JSON workflow definition to GitHub Actions YAML format.
Nested JSON to YAML
Convert deeply nested JSON configuration to YAML.