Skip to content

YAML to JSON Converter

Convert YAML to JSON and back, with syntax checking.

LOCAL WORKSPACENO UPLOAD REQUIRED

JSON output

Paste a document on the left.

About YAML to JSON Converter

YAML is the configuration language of Kubernetes, GitHub Actions, Docker Compose and much of modern infrastructure tooling. Its indentation-sensitive syntax is friendly to write and unforgiving to get wrong.

This converter parses YAML into JSON so you can see exactly how a tool will interpret your file, and converts JSON back into readable YAML when you need to move in the other direction.

How YAML to JSON Converter works in your browser

YAML is parsed into a data structure and printed as JSON, so you can see exactly how a tool will interpret indentation, lists and scalars. The reverse direction converts JSON back into readable YAML.

The parser covers the common configuration subset — mappings, sequences, quoted and block scalars, comments and flow collections. Anchors, aliases and custom tags are reported rather than silently mangled, and tab indentation is flagged because it is invalid YAML.

When to use it

  • Checking how a Kubernetes or GitHub Actions file will actually be interpreted.
  • Finding the indentation error that breaks a Docker Compose file.
  • Converting a JSON config into YAML for a tool that expects it.

Frequently asked questions

How do I convert YAML to JSON?

Paste the YAML and the JSON equivalent appears, which shows exactly how a tool will interpret your indentation. The reverse direction converts JSON back to YAML.

Which YAML features are supported?

The common configuration subset: nested mappings, sequences, scalars, quoted strings, comments, multi-line block scalars and inline flow collections.

Are anchors and aliases supported?

Anchors, aliases and custom tags are not resolved. They are rare in hand-written configuration and are reported rather than silently mangled.

Why does indentation matter so much?

YAML uses indentation for structure, and tab characters are not valid indentation. The converter flags tabs explicitly because they are a very common cause of errors.

Related tools