Search tools

YAML to JSON Converter

Convert YAML to JSON and find indentation mistakes by line and column.

YAML to JSON Converter tool

Options

Processing runs in your browser.

YAML is easy to read but easy to break: one wrong space can change the structure or stop a deployment. Converting to JSON shows exactly how a parser understands your file, and any syntax error is reported with its position.

Use it to

  • Debug config: see what a Kubernetes or Compose file really contains after indentation is applied.
  • Feed APIs: many APIs accept JSON only, while specs and configs are often written in YAML.
  • Validate before deploying: catch tab characters and indentation mistakes before CI does.
  • Compare files: convert two YAML files to JSON and diff them.

How to use the YAML to JSON Converter

  1. Paste YAML, or open a .yaml or .yml file.
  2. Choose the JSON indentation.
  3. If the YAML has an error, fix the line shown in the message.
  4. Copy or download the JSON.

Features

  • Reports YAML syntax errors with the line and column.
  • Uses the strict JSON schema: only true and false are booleans, so “no” and “on” stay text.
  • Multiple documents separated by --- become a JSON array.
  • Comments are ignored, as JSON can’t hold them.

Frequently asked questions

Why does “NO” (Norway’s country code) become false in some tools?

Older YAML 1.1 parsers treat yes, no, on and off as booleans — the famous “Norway problem”. This converter uses the stricter JSON-compatible rules, so only true and false are booleans and NO stays a string.

What are the most common YAML errors?

Mixing tabs and spaces (YAML forbids tabs for indentation), inconsistent indentation within a list, and a missing space after a colon. The error message points to the line where the parser got confused.

Are anchors and aliases supported?

Yes. Anchors (&name) and aliases (*name) are resolved, so the JSON contains the full repeated values.

Written by