YAML to JSON Converter Online — Free & Private

Paste Docker Compose, Helm values or Ansible-style YAML and get strict JSON for APIs and CI gates. Single document only. Anchors resolve, and BigInt or Date values are rejected for JSON parity.

Loading…
YAML → JSON from manifests to API payloads
Turns Compose or Kubernetes YAML into strict JSON, with no upload.

Developer notes

Anchors and aliases are resolved before the JSON is written, so check that the resolved result is valid JSON. A file with several documents, separated by three hyphens, is rejected. Split it first. Timestamps that YAML reads as dates are rejected with an explicit error. Write them as quoted strings. Large pastes can slow the page, so process very big inputs in chunks offline.

Use cases

Validate YAML written by hand with a JSON Schema in CI. Feed a frontend tool that only reads JSON. Turn Helm values into REST patch bodies.

About these options

CSV exports: choose a delimiter (Auto follows locale — semicolon on /fr), RFC-minimal vs always-quoted fields, line endings, and whether to emit a header row. CSV imports: delimiter is auto-detected from the first line (comma, semicolon, tab, or pipe) — toggle whether row 1 holds column names. JSON output (XML, YAML, or CSV sources): indentation (including compact one-line) and optional recursive key sort. JSON → XML: toggle pretty-printing and indent width. YAML output: indent width, readable vs tighter layout, and deterministic string quoting (there is no source YAML file to “preserve”). XML comments are not represented in the intermediate JSON tree.

Examples

Kubernetes deployment

Input

apiVersion: apps/v1 kind: Deployment metadata: name: checkout-api labels: app: checkout spec: replicas: 3 selector: matchLabels: app: checkout template: metadata: labels: app: checkout spec: containers: - name: api image: registry.example/checkout:2.4.1 ports: - containerPort: 8080

Output

{ "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "checkout-api", "labels": { "app": "checkout" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "checkout" } }, "template": { "metadata": { "labels": { "app": "checkout" } }, "spec": { "containers": [ { "name": "api", "image": "registry.example/checkout:2.4.1", "ports": [ { "containerPort": 8080 } ] } ] } } } }

Service with a list of endpoints

Input

service: name: billing-gateway port: 8443 tls: enabled: true minVersion: "1.2" endpoints: - /health - /metrics - /ready

Output

{ "service": { "name": "billing-gateway", "port": 8443, "tls": { "enabled": true, "minVersion": "1.2" }, "endpoints": [ "/health", "/metrics", "/ready" ] } }

Related tools

Check the result with the JSON validator, format it with the JSON formatter or browse it in the JSON tree viewer. To run another conversion, come back to YAML → JSON. For a spreadsheet, use JSON → CSV.

YAML → JSON FAQ

One document at a time

What happens with several documents separated by three hyphens?

They are rejected. Paste one document only.

Why are YAML timestamps rejected?

js-yaml reads them as dates, which JSON cannot hold. Write the value as a quoted string in the YAML.

Are tags and anchors handled?

Anchors, aliases and merge keys are resolved by js-yaml. A cycle gives a parse error.

Is my data sent to a server?

No. The conversion runs in your browser, and FastMinify never receives what you paste.

Convert YAML to JSON, XML, CSV, TOML, TSV, Properties and INI — cross-target TOML via Properties → TOML and INI → TOML in alsoLinks.