YAML to JSON & JSON to YAML — Free Online Converter

Free online YAML ↔ JSON converter. Convert Kubernetes, GitHub Actions, OpenAPI, and other YAML to JSON and back. Runs locally in your browser. Free online.

How to use

  1. Choose Direction — Select YAML → JSON or JSON → YAML.
  2. Paste Input — Paste your YAML or JSON document.
  3. Copy Output — Copy or swap to convert back.

YAML to JSON & JSON to YAML — Free Converter

Switch between YAML and JSON in both directions, instantly. Paste a Kubernetes manifest, GitHub Actions workflow, OpenAPI spec, or any config and get the equivalent JSON — or vice versa. The tool runs locally in your browser, so even private infrastructure files stay on your machine.

Why Convert YAML to JSON?

YAML is the configuration language of choice for DevOps tooling — Kubernetes, Helm, Ansible, GitHub Actions, GitLab CI, and Docker Compose all use it. JSON, by contrast, is the data interchange standard for APIs and tooling. Converting between them is a daily task for SREs, platform engineers, and full-stack developers.

How the Converter Works

YAML → JSON parses your YAML using js-yaml's safe loader and serializes the resulting object with JSON.stringify. JSON → YAML does the reverse with yaml.dump, producing block-style YAML with two-space indentation. Both directions preserve nested objects, arrays, and primitive values.

Common Use Cases

  • Kubernetes manifests: Convert YAML deployments to JSON for kubectl --output=json or for tooling that requires JSON input.
  • OpenAPI specs: Swap between formats when integrating with tools that prefer one over the other.
  • CI/CD configs: Validate GitHub Actions or GitLab pipelines by converting to JSON and inspecting structure.
  • Migration: Move legacy JSON configs to readable YAML, or compress YAML to compact JSON.

Privacy

All conversion happens in your browser. The tool never uploads your manifests or configs, which makes it safe for cluster definitions and other sensitive infrastructure files.

Related: JSON Formatter, JSON to TypeScript, JSON Validator.

Frequently asked questions

Which YAML version is supported?

The converter uses js-yaml, which implements YAML 1.2 with safe loading by default. Custom tags are not executed.

Are anchors and aliases supported?

Yes. js-yaml resolves anchors (&) and aliases (*) when converting YAML to JSON.

What happens to comments?

JSON has no comment syntax, so YAML comments are dropped in the YAML → JSON direction. JSON → YAML output contains no comments either.

Why does my YAML produce a different shape?

Check indentation. YAML uses spaces for nesting, and one inconsistent line can change the entire structure.

Is my data sent anywhere?

No. Parsing runs locally in your browser; no upload occurs.

Related free tools

  • XML Formatter & Minifier — Beautify or minify any XML — SOAP, RSS, SVG, sitemap. Browser-based parser.
  • XML to JSON Converter — Parse any well-formed XML into a clean JSON tree with attributes and arrays.
  • JSON to XML Converter — Convert JSON to well-formed XML — supports attributes, custom root, declaration.
  • CSV Viewer — Open CSV or TSV files in your browser — sort, search, paginate, export filtered view.
  • JSON to CSV Converter — Convert JSON data to CSV format. Export to spreadsheets easily.
  • CSV to JSON Converter — Convert CSV data to JSON format. Useful for API development.
  • JSON Formatter — Format, beautify, or minify JSON with customizable indentation.
  • JSON Validator — Validate JSON syntax and find errors with line and column numbers.
  • HTML Minifier — Compress HTML by removing comments, whitespace, and line breaks.
  • CSS Minifier — Minify CSS by stripping comments, whitespace, and unnecessary characters.
  • JavaScript Minifier — Compress JavaScript by removing comments, whitespace, and empty lines.
  • Base64 Encoder/Decoder — Encode text to Base64 or decode Base64 back to text. UTF-8 support.

Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools