YAML → JSON — configs and manifests to machine JSON

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

Loading…
YAML → JSON — ops manifests to API payloads
Explains Compose/Kubernetes snippets becoming strict JSON without uploads.

Developer notes

• Anchors merge per js-yaml — ensure resolved graph stays JSON-safe. • Multi-document files error by design — split upstream. • Large files may block the main thread; prefer chunks >512 KiB offline.

When teams pick this route

• CI gates needing JSON Schema validation after hand-written YAML. • Frontend tooling accepting only JSON.parse-friendly configs. • Migrating 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 + whether row 1 holds column names (Auto delimiter follows locale only for convenience). 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.

Worked examples

Tiny service map

Sample input

service: name: billing port: 8080 tls: true

Sample output

{ "service": { "name": "billing", "port": 8080, "tls": true } }

List of endpoints

Sample input

endpoints: - /health - /ready

Sample output

{ "endpoints": [ "/health", "/ready" ] }

Navigate related converters

Ship YAML elsewhere with YAML → XML, spreadsheets via YAML → CSV, or round-trip from JSON → YAML.

YAML → JSON FAQ

Single-doc constraint

Multiple `---` documents?

Rejected — paste one stream only.

JavaScript Date objects from YAML timestamps?

Rejected with an explicit error — stringify dates in YAML as strings first.

Compared to kubectl conversions?

FastMinify targets clipboard workflows, not cluster APIs.

Tags & anchors?

Resolved by js-yaml; cycles surface as parse errors.

Looking for every converter, encoder, and minifier in one place? Developer tools hub Open the curated developer tools catalogue.

YAML to JSON — Kubernetes, Compose & GitOps configs