YAML to JSON Converter

About this tool

YAML is read with the open-source yaml library (YAML 1.2) and written as 2-space JSON with JSON.stringify; the other direction parses JSON and writes 2-space YAML. Handy for checking Kubernetes manifests or GitHub Actions files as JSON, or turning API responses into config files.

Following YAML 1.2, yes/no/on/off stay strings and only true/false become booleans. Anchors (&) and aliases (*) are expanded, and with multiple documents separated by --- only the first is converted. YAML comments have nowhere to go in JSON and are dropped.

Syntax errors are shown with line and column. Tabs are not allowed for YAML indentation, so use spaces. Conversion happens on this device.

FAQ

What happens to YAML comments?

JSON has no comments, so they are dropped in YAML → JSON. Use the YAML Formatter to tidy YAML while keeping comments.

Why are yes/on not converted to true?

That is the YAML 1.2 rule: only true/false are booleans (YAML 1.1 treated yes/on as true).

Is my data sent anywhere?

No. Conversion runs in your browser.

Related tools