All toolsFree tool

YAML ⇄ JSON Converter & Validator

Convert between YAML and JSON, or validate YAML syntax. Handy for Ansible, Kubernetes and CI pipelines. Runs entirely in your browser.

About this tool

This tool converts YAML to JSON, converts JSON to YAML, and validates YAML on its own. Conversion uses the js-yaml library running inside the page, so anchors, aliases and the usual YAML type coercions behave the way most tooling expects.

YAML is the configuration language of Ansible, Kubernetes, Docker Compose and most CI systems, and its significant whitespace makes it easy to break in ways that are hard to see. Converting to JSON removes the ambiguity: if a key ended up nested one level too deep, the JSON output shows it immediately. Processing happens in your browser — the library is fetched from a CDN, but the text you paste is never transmitted. For standardising configuration across environments, see our infrastructure automation & DevOps work.

How to use it

Paste your content into the box, then choose the operation you need.

  • YAML to JSON converts and pretty-prints — the fastest way to check how a parser actually reads your indentation.
  • JSON to YAML emits block-style YAML, useful when moving values into a Helm chart or an Ansible vars file.
  • Validate YAML parses without converting and reports the first syntax error it finds.
  • YAML errors usually point at the line after the real mistake, so check the preceding block as well.

Common questions

Why did my YAML values change type?

YAML coerces unquoted scalars. Depending on the schema, yes, no, on and off can parse as booleans, and a version string such as 1.10 becomes a float and loses the trailing zero. Quote anything that must remain a string.

Does it handle multi-document YAML?

The converter loads a single document. Files that use --- separators, which is common in Kubernetes manifests, should be split and converted one document at a time.

Is my configuration uploaded?

No. Parsing runs in your browser with js-yaml. The page loads that library over the network, but the content of the text box is never sent anywhere.

Need help with automation and config?

Talk to a senior engineer about your environment.

Contact Us