Online YAML ↔ JSON

Switch between YAML configs and JSON for debugging, mocks, and API docs. Direction is detected from whether input starts with { or [.

About online YAML and JSON conversion

Switch between YAML configs and JSON for debugging, mocks, and API docs. Direction is detected from whether input starts with { or [.

Parsing runs locally in your browser—nothing is uploaded.

Online YAML ↔ JSON capabilities

Auto direction

YAML text becomes indented JSON; JSON objects or arrays become YAML with readable spacing.

What converts cleanly

  1. Maps, lists, strings, numbers, booleans, and null—typical config shapes.
  2. JSON is a subset of YAML syntax, so many YAML files round-trip through JSON.
  3. Anchors, aliases, and custom tags are not preserved—use plain YAML for this tool.

When to double-check

  • Very large numbers: YAML may parse them as integers; JSON has fixed number rules.
  • Multi-document files (--- separators): convert one document at a time.

Common use cases

Kubernetes & CI configs

Turn a deployment YAML fragment into JSON for jq, policy tests, or API payloads.

Local dev & mocks

Paste JSON from an API response and get YAML for docker-compose or Spring-style configs.

Docs & code review

Compare the same data in both formats when reviewing README or OpenAPI examples.

Frequently asked questions

Is YAML a superset of JSON?
Every JSON document is valid YAML, but YAML adds features (comments, anchors, unquoted strings). This tool focuses on data structures both formats share—maps, lists, and scalars.
Why does my YAML fail to convert?
Common causes are inconsistent indentation (YAML is whitespace-sensitive), tabs instead of spaces, or a stray character before the first key. Fix indentation or paste a smaller snippet to locate the error.
How are booleans and null handled?
YAML true/false/null become JSON true/false/null. Quoted "yes"/"no" stay strings in JSON, which matches how strict JSON parsers behave.
Can I convert multiple YAML documents at once?
No—paste one document per run. Split on --- lines and convert each block separately.