Skip to content
ToolsMinify logo
Converter Tools

YAML to JSON Converter

Paste YAML and convert to JSON online - or go the other way on the same page.

About YAML to JSON Converter

Paste YAML and convert to JSON online - or go the other way on the same page. This free YAML to JSON Converter runs entirely in your browser, so Docker Compose files, GitHub Actions workflows, and Kubernetes manifests with secrets never leave your device. Default YAML 1.2 CORE typing keeps country code NO and yes as strings (toggle YAML 1.1 if you need legacy yes/no/on/off booleans). Multi-document streams separated by --- become a JSON array; Swap feeds the output back as input.

How to Use YAML to JSON Converter

  1. Choose YAML → JSON or JSON → YAML (or Swap direction after a conversion).
  2. Paste your config, drop a local .yaml / .yml / .json file (max 10 MB - read in the browser only), or load a Docker Compose, GitHub Actions, Kubernetes, or Norway-problem sample.
  3. Pick YAML 1.2 CORE (recommended) or YAML 1.1 legacy, set indent 2/4, and optionally sort keys. Review the type census and multi-document badge.
  4. Copy or download the result. Comments are stripped on YAML → JSON because JSON has none. Nothing is uploaded.

YAML to JSON Converter Examples

Docker Compose to JSON

Paste a compose.yaml services block and get typed JSON for an API or test fixture. Ports like "8080:80" stay strings when quoted; numbers and booleans keep their JSON types.

GitHub Actions workflow

Convert a workflow YAML excerpt to JSON to inspect nesting, or convert JSON back to YAML when editing fixtures by hand.

Kubernetes Deployment

apiVersion / kind / metadata / spec convert cleanly. Quoted version: "1.25" stays a string so consumers do not get a float.

Multi-document stream

Two manifests separated by --- become a JSON array of two objects. Swap back to JSON → YAML to re-emit a --- separated stream.

Norway problem check

Load the Norway sample with YAML 1.2: country NO stays "NO". Switch to YAML 1.1 and NO becomes false - use the type census to catch silent coercion.

Frequently Asked Questions about YAML to JSON Converter

How do I convert YAML to JSON online?
Choose YAML → JSON, paste your YAML (or drop a .yaml / .yml file), and copy or download the JSON. Conversion runs in your browser - nothing is uploaded.
Can I convert JSON to YAML on the same page?
Yes. Switch to JSON → YAML or use Swap direction. An array of objects from a multi-document conversion re-emits a --- separated YAML stream.
Does this work for Docker Compose, GitHub Actions, and Kubernetes?
Yes. Those are the main use cases. Load the built-in samples, or paste your own compose.yaml, workflow, or Deployment. Private configs stay on your machine because parsing never leaves the browser.
What is the Norway problem?
YAML 1.1 treats unquoted yes, no, on, off, y, and n as booleans, so country code NO becomes false in JSON. This tool defaults to YAML 1.2 CORE, which keeps NO and yes as strings. Toggle YAML 1.1 only when you need legacy behaviour.
How are multi-document YAML files handled?
Documents separated by --- become a JSON array, one element per document in source order. That matches how many DevOps tools treat a stream of manifests.
Are YAML comments preserved in JSON?
No. JSON has no comment syntax, so # comments are stripped. The UI shows a badge when comments were detected so you know annotations did not survive.
Is my YAML uploaded to a server?
No. Parsing and conversion run only in your browser. Safe for manifests with secrets, database URLs, and internal hostnames.
How is this different from other YAML to JSON converters?
One URL covers both directions with Swap, YAML 1.2 vs 1.1 schema toggle for the Norway problem, multi-document → JSON array with a doc-count badge, a live type census to catch coercion, DevOps samples (Compose / Actions / Kubernetes), and line-precise errors - all without uploading your config.