Utility workspace

YAML ↔ JSON Converter - My Tools

Convert YAML and JSON online while choosing indentation for each output format.

YAML ↔ JSON Converter

How to use

  • To convert YAML to JSON, enter YAML, then click YAML → JSON.
  • To convert JSON to YAML, enter JSON, then click JSON → YAML.
  • JSON indentation and YAML indentation: Choose the number of spaces in the output.
  • Syntax errors or duplicate YAML keys appear below the input field.

Note: YAML comments may not be preserved during conversion.

YAML and JSON conversion

YAML is often used for configuration files, while JSON is frequently used for API responses and data exchange.

This converter is useful for inspecting YAML-managed content such as Docker Compose, GitHub Actions, and Kubernetes configurations as JSON, or converting example API JSON into YAML configuration form.

When you enter multiple YAML documents, they are converted to a JSON array so you can compare their structures at once.