← Free online tools

Data format tools

YAML to JSON Converter

Convert YAML to JSON or JSON to YAML. Errors show the line number, and multi-document YAML, anchors and merge keys are supported.

Local conversion

Your YAML and JSON are processed in the browser and are not uploaded.

Switching direction moves the current output into the input box.

YAML input

JSON output

Follows YAML 1.2 (core schema). Comments are not kept. Anchors, aliases and merge keys (<<) are expanded. Dates such as 2024-01-01 stay as strings. Custom tags such as !Ref are reported as errors instead of being guessed.

Bidirectional

Convert YAML to JSON or JSON to YAML without changing tools.

Clear errors

Bad indentation, duplicate keys and unclosed quotes are reported with the line number instead of producing wrong JSON.

Copy or download

Copy the result or download it as data.json / data.yaml.

Conversion Notes

Config files

Useful for Docker Compose, GitHub Actions, Kubernetes snippets, and app settings.

What is not kept

Comments and anchor names are lost in JSON. Complex keys ("? ") and custom tags are not supported and are reported as errors.

FAQ

Is YAML or JSON uploaded?

No. Parsing and conversion run in your browser. Nothing you paste is sent to a server.

Are multiple YAML documents supported?

Yes. When the input contains several documents separated by ---, the JSON output is an array with one item per document.

Are anchors, aliases and merge keys supported?

Yes. Anchors (&name), aliases (*name) and merge keys (<<: *name) are expanded into plain JSON. Comments cannot be represented in JSON and are dropped.

Which YAML version is used?

YAML 1.2 core schema: true/false, null and numbers are converted; values such as yes, no, on, off, 1_000 and dates stay as strings. Quote a value in YAML if you need it to stay a string.

What happens with custom tags like !Ref?

They are reported as an error with the line number, because JSON has no way to represent them. Standard tags such as !!str and !!int are supported.

Related Tools

loresync tools publishes 160 free online tools.