Skip to main content
${format:vault}

YAML → JSON Converter

YAML Input
Tab inserts an indent. Press Escape, then Tab, to move focus out of the editor.
JSON Output

Why use a private YAML to JSON converter?

YAML is the standard config format for Kubernetes, Ansible, GitHub Actions, and most modern CI/CD systems. But programmatic tooling — scripts, APIs, data pipelines — almost universally expects JSON. Kubernetes manifests and Helm values files often contain internal service addresses, secret references, and environment-specific configuration that shouldn't be pasted into an online converter.

This converter uses js-yaml, the same parser that many Node.js tools use internally, running entirely in your browser. Nothing you paste is transmitted anywhere.

How it works

js-yaml parses the YAML input into a JavaScript object tree, resolving all anchors (&anchor) and aliases (*alias) before conversion. JSON.stringify() then serializes the result with 2-space indentation.

Multi-document YAML files (documents separated by ---) are converted to a JSON array where each element is one parsed document. YAML timestamps are converted to ISO 8601 strings. YAML booleans (yes, no, on, off) are resolved to JSON true and false.

Common use cases

  • Converting Kubernetes manifests or Helm values files to JSON for programmatic processing
  • Translating GitHub Actions workflow YAML to JSON for tooling that requires JSON input
  • Exporting Ansible playbooks or inventory YAML to JSON for reporting scripts
  • Converting Docker Compose files to JSON for validation or transformation pipelines
  • Extracting structured data from YAML-formatted API documentation into JSON
  • Consuming multi-document YAML pipelines as a JSON array for further processing
  • Debugging YAML anchor/alias expansion by seeing the fully resolved JSON output

Frequently asked questions

Does it support multi-document YAML?
Yes. Documents separated by --- are converted to a JSON array where each element is one parsed document. This is useful for Kubernetes manifests that bundle multiple resources in a single file.
How are YAML anchors and aliases handled?
Anchors (&name) and aliases (*name) are fully resolved before conversion. The output JSON reflects the dereferenced values — aliases are replaced with the full content of their anchor, which is useful for seeing the actual data that YAML aliases abstract away.
Are YAML-specific boolean values like yes/no converted correctly?
Yes. YAML 1.1 boolean variants (yes, no, on, off, true, false) are all resolved to JSON true or false. This is particularly relevant for Kubernetes and Ansible YAML which uses these variants.
How are YAML timestamps converted?
YAML timestamps are parsed by js-yaml and converted to ISO 8601 strings in the JSON output. JSON has no native datetime type, so string is the closest equivalent and the most interoperable format.
Is it safe to convert Kubernetes secrets or Helm values with credentials?
Yes. js-yaml runs entirely in your browser — your manifests and values files are never transmitted to any server. This is specifically designed for infrastructure files that contain sensitive references.

Related tools