Skip to content
Utilerio

YAML ↔ JSON Converter

Convert YAML to JSON or JSON to YAML instantly, right in your browser.

JSON

The result will appear here.

Was this tool useful?

About this tool

YAML and JSON describe the same kind of data — nested objects, arrays, strings, numbers — with different syntax. YAML is the format of choice for Kubernetes manifests, GitHub Actions workflows, Docker Compose files and most modern config files, because it reads cleanly without JSON's braces and quotes. JSON is what your code actually parses at runtime.

This converter runs js-yaml, the same YAML 1.2 parser used by ESLint and many other JavaScript tools, entirely in your browser. Nothing you paste is uploaded anywhere.

How to use it

  1. Paste YAML on the left to convert it to JSON, or switch to "JSON → YAML" and paste JSON instead.
  2. The result updates as you type.
  3. Use the mode buttons to swap direction — the current output becomes the new input, so you can round-trip a file to check the conversion is lossless.
  4. Copy the result or download it as a .json or .yaml file.

Examples

A Kubernetes-style manifest

apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    app: web
{
  "apiVersion": "v1",
  "kind": "Pod",
  "metadata": {
    "name": "nginx",
    "labels": {
      "app": "web"
    }
  }
}

Common problems

The converter reports an error on YAML that looks fine.
YAML is whitespace-sensitive — check that every level of nesting uses consistent indentation (spaces, not tabs), and that a value containing a colon is quoted, e.g. url: "http://example.com".

Frequently asked questions