DevToolbox

YAML ↔ JSON Converter

Convert YAML to JSON and JSON to YAML with instant error feedback.

Processed locally in your browser

YAML

JSON

What is the YAML ↔ JSON Converter?

The YAML ↔ JSON Converter transforms YAML documents into JSON and JSON documents into YAML, entirely in your browser. YAML is the standard for configuration files (Kubernetes, CI pipelines, Docker Compose), while JSON dominates APIs and data interchange — converting between the two is a daily developer task.

The converter uses a robust YAML parser that supports the YAML 1.2 specification, and reports syntax errors with line information so you can quickly find problems like bad indentation or unclosed quotes.

How to use the YAML ↔ JSON Converter

  1. Paste YAML in the left panel or JSON in the right panel.
  2. Click YAML → JSON or JSON → YAML to convert.
  3. Use Swap to move the output back to the input for round-trip editing.
  4. Copy or download the converted result.

Examples

YAML input

name: John
age: 30
skills:
  - JavaScript
  - TypeScript

JSON output

{
  "name": "John",
  "age": 30,
  "skills": [
    "JavaScript",
    "TypeScript"
  ]
}

Frequently asked questions

Is anything uploaded to a server?

No. The YAML parser runs entirely in your browser, so configuration files — which often contain internal details — never leave your machine.

Are YAML comments preserved when converting to JSON?

No. JSON has no comment syntax, so comments are dropped during conversion. Converting back to YAML will not restore them.

Which YAML version is supported?

The parser targets YAML 1.2, which covers virtually all modern configuration files including Kubernetes manifests and GitHub Actions workflows.

Why did my YAML numbers or booleans change type?

YAML infers types: yes/no and on/off may parse as booleans, and unquoted values like 1.0 parse as numbers. Quote values in your YAML to force strings.