YAML to JSON Converter

Paste YAML, get clean JSON. Handles YAML 1.2 features: anchors and aliases, multi-document streams (split by ---), flow vs block style, complex scalars (timestamps, booleans, nulls). Round-trip safe with our JSON converters.

How to use the YAML to JSON Converter

Paste YAML. Pick output indent. For YAML files with multiple ----separated documents (common in Kubernetes manifests), enable multi-document — the output becomes a JSON array of documents.

Converting YAML to JSON

YAML is what people write — Kubernetes manifests, CI pipelines, application config — because it is readable and comment-friendly. JSON is what programs parse. Converting between them sounds trivial until YAML’s richer features show up: anchors and aliases that reuse blocks, multiple documents in one file separated by ---, and scalars like timestamps and booleans that need careful typing.

This converts YAML to JSON with full YAML 1.2 support — resolving anchors and aliases, handling multi-document streams as a JSON array, and typing complex scalars correctly — with selectable indent or minified output. For round-tripping across formats the JSON / YAML / TOML roundtrip editor shows all three at once, and the YAML to TOML converter targets TOML specifically.

Common use cases

  • Parse a manifest — turn a Kubernetes YAML file into JSON.
  • Resolve anchors — expand YAML anchors and aliases into plain JSON.
  • Multi-document files — convert ----separated docs into a JSON array.
  • Feed a tool — convert config a JSON-only program can read.
  • Minify — emit compact JSON when you do not need indentation.

Frequently asked questions

Which YAML version is supported?

YAML 1.2, including anchors and aliases, multi-document streams, and complex scalar types.

How are multi-document YAML files handled?

Enable multi-document and the documents separated by --- become a JSON array, one entry per document.

Does it resolve anchors and aliases?

Yes — anchors and aliases are expanded so the JSON output is fully self-contained.

Can it convert to TOML instead?

For TOML output use the YAML to TOML converter or the three-format roundtrip editor.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: