Skip to content

YAML to JSON Converter

Converts YAML to JSON, reporting indentation and syntax errors with their exact line.

Your YAML stays on this device

This tool runs entirely inside your web browser. Your YAML is processed on your own device and is never sent to our servers. How this works

JSON

YAML to JSON Converter is a free tool that converts YAML documents, such as Kubernetes manifests, Docker Compose files and CI pipelines, into JSON. It also works as a YAML validator: syntax and indentation errors are reported with their exact line and a suggested fix. Everything runs in your browser.

How to convert YAML to JSON

  1. Paste your YAML or open a .yaml / .yml file.
  2. The JSON appears on the right, pretty-printed or minified.
  3. If there is an error, click Show to jump to the line.

Common YAML errors

How values are interpreted

The converter follows YAML 1.2, the current version. Only true and false become booleans, so values like yes, no, on and the country code NO stay as text. Older YAML 1.1 tools turn them into booleans, which is a frequent source of bugs.

To convert in the other direction, for example to turn an API response into a configuration file, useJSON to YAML. The JSON Formatter can tidy or minify the result, and JSON Diff compares two versions of a configuration.

Frequently asked questions

Why does my YAML fail to convert?

The most common causes are tabs used for indentation (YAML only allows spaces), items that don’t line up at the same indentation, and a missing space after a colon.

How are yes, no and on handled?

This converter follows YAML 1.2, where only true and false are booleans. yes, no, on and off stay as text, which avoids the “Norway problem” where the country code NO turns into false.

What about anchors and aliases?

They are expanded, so the JSON contains full copies. Aliases are limited to prevent “billion laughs” files from exhausting memory.

What happens with multiple documents?

YAML files containing several documents separated by --- become a JSON array with one item per document.

Last updated

Missing a feature, or need a tool we don’t have? Suggest it.