toolgix

YAML ⇄ JSON Converter

Convert YAML to JSON and JSON to YAML, with clear error positions.

Runs in your browserFree · no sign-up
01 Input
02 Output
OPT Options
Convert

How to use YAML ⇄ JSON Converter

  1. Paste YAML or JSON (or open a .yaml/.json file).
  2. Choose the direction.
  3. Copy or download the converted output.

How it works

Conversion uses js-yaml with the YAML 1.2 core schema. Under YAML 1.2, words like yes, no and on stay strings rather than turning into booleans (a common YAML 1.1 surprise), and dates stay as text.

Several documents separated by --- are converted into a JSON array. When the YAML is invalid, the error shows the line and column, which usually points at an indentation problem.

Frequently asked questions

Why did "yes" not become true?

In YAML 1.2, only true/false are booleans. Older YAML 1.1 parsers treat yes/no/on/off as booleans; check which version your application uses.

Are comments preserved?

No. JSON has no comments, so YAML comments are dropped when converting to JSON.

Can it validate Kubernetes or Docker Compose files?

It checks that the YAML is well-formed. It does not check the schema of a specific tool.

Is my config uploaded?

No. Conversion happens in your browser; nothing is saved.

Limitations

  • Anchors and aliases are expanded in JSON output.
  • Custom YAML tags (such as !Ref in CloudFormation) are not supported and show an error.

Last reviewed November 9, 2026. How we build and test tools.

Categories

Recent and favourites

Tools you open appear here, and tools you star with “Favourite” stay at the top. This list is kept only in this browser.

Browse all 78 tools

↑ ↓ to moveEnter to openEsc to close