YAML ↔ JSON

Convert between YAML and JSON

Input
Output

About YAML-JSON Converter

This tool uses js-yaml to convert between YAML and JSON formats. It supports standard YAML syntax and JSON objects/arrays.

About YAML <-> JSON Converter

1What is it?

Convert YAML to JSON and JSON to YAML instantly. Validate your data structure and fix syntax errors. Perfect for developers working with configuration files, APIs, and data serialization.

2Use Cases

  • Convert Kubernetes manifests (YAML) to JSON
  • Transform JSON API responses to YAML for readability
  • Migrate configuration files between formats
  • Debug YAML syntax errors
  • Prepare data for different systems

3Examples

YAML to JSON

Input

name: John
age: 30

Output

{
  "name": "John",
  "age": 30
}

?Frequently Asked Questions

Does it support comments?

YAML supports comments, but JSON does not. When converting YAML to JSON, comments are lost. When converting JSON to YAML, you can add new comments, but original JSON has no comments to preserve.