YAML to JSON Converter

Convert YAML to JSON and catch YAML syntax errors with the line number.


YAML to JSON Converter

Paste YAML, such as a config file, a Kubernetes manifest or an OpenAPI spec, and get the same data as JSON. If the YAML has a mistake, the converter points to the line, which makes it a handy YAML validator too. Anchors and aliases are resolved, and everything runs locally with the js-yaml library.

How to use YAML to JSON Converter

  1. Paste your YAML.
  2. Choose pretty-printed or minified JSON.
  3. Copy or download the JSON. If there is an error, fix the line it names and try again.

When it comes in handy

  • Feeding YAML config into a tool or API that expects JSON.
  • Checking a YAML file for indentation mistakes.

Frequently asked questions

Will "yes" and "no" become true and false?
Not here: the converter follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 tools read yes, no, on and off as booleans, so quote such values if the file is used elsewhere.
Can it convert several YAML documents separated by ---?
Yes. A file with several documents becomes a JSON array with one item per document.

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.