Skip to content
TextArray
100% local

YAML ⇄ JSON converter

Convert YAML to JSON and back — Kubernetes manifests, CI configs, OpenAPI specs.

Input

YAML ⇄ JSON converter

Paste a YAML file and get JSON back, or paste JSON and get clean YAML — the direction switch converts both ways. This is the quickest way to turn a Kubernetes manifest or a docker-compose file into JSON for a script, jq or an API call, to check what a GitHub Actions workflow actually contains, or to move an OpenAPI spec between the two formats. Configuration formats rarely match the tool you have at hand; this converter closes that gap without installing anything.

The YAML side parses safely: anchors and aliases are resolved into plain values, and a multi-document stream separated by --- becomes a JSON array with one element per document. Parse errors are reported calmly with the line number, so a bad indent on line 40 of a long pipeline config doesn't turn into guesswork. Going the other way, valid JSON is always valid YAML — the tool emits readable block-style YAML and keeps long strings on one line instead of folding them.

The indent option controls the output: two spaces (the YAML convention), four spaces, or minified. Minified applies to JSON only — YAML has no minified form, so that choice honestly falls back to two spaces there. Comments do not survive the conversion in either direction; JSON has nowhere to put them.

Everything runs locally in your browser and nothing is uploaded — which matters, because real-world config files carry tokens, internal hostnames and connection strings. Convert, copy the result or download it as a file, and chain it into the JSON formatter or flattener for the next step.

FAQ

What happens with multi-document YAML?
A stream with --- separators — the Kubernetes convention — becomes a JSON array with one element per document. A single document converts to that document alone.
Are comments and anchors preserved?
Comments are dropped in both directions, because JSON has no comment syntax. Anchors and aliases are resolved into plain values, so every reference is expanded in the JSON output.
Can the YAML output be minified?
No — YAML has no minified form, its structure lives in the indentation. The minified choice applies to JSON output only; for YAML it falls back to two spaces.
Which YAML features are supported?
YAML 1.2 with the core schema: mappings, sequences, scalars, anchors, aliases and multi-document streams. Language-specific tags that have no JSON equivalent are not supported, and dates stay strings.
Is my configuration uploaded anywhere?
No. The conversion runs entirely in your browser and your YAML or JSON never leaves your device — including any tokens or credentials inside it.