YAML ↔ JSON
ClientOnline YAML to JSON and JSON to YAML converter—paste on either side, convert in one click, and format or copy results. Sample JSON is pre-filled for JSON → YAML; use Load YAML example to try YAML → JSON without typing a file.
Learn more: YAML ↔ JSON
Convert YAML to JSON and JSON to YAML in either direction—format either panel, copy results, or prefill from agent links. Everything runs locally with js-yaml.
YAML in one sentence
YAML is often used for human-edited configuration: indentation shows nesting, and quotes are needed less often than in JSON. Under the hood many tools parse YAML into the same kinds of maps and lists JSON uses.
YAML → JSON workflow
Paste a .yml or .yaml file on the right, click YAML → JSON, and get pretty-printed JSON on the left. Use that output in API clients, JSON Schema validators, or diff tools that only accept strict JSON.
JSON → YAML workflow
Paste API or log JSON on the left and click JSON → YAML when you need a readable config snippet for Kubernetes manifests, GitHub Actions, or docker-compose style files. Load the JSON example to see the shape first.
Which to choose
JSON is strict and ubiquitous in web APIs; YAML can be easier to read for large static config. Convert when you need to paste into a system that only accepts one format—not every YAML feature (anchors, merges, custom tags) survives a JSON round trip.
Limits
Multi-document YAML streams and exotic tags may fail or flatten unexpectedly. After conversion, spot-check booleans: YAML 1.1 can treat yes/no/on as booleans, which may differ from your JSON source.
What this does
Bidirectional YAML to JSON and JSON to YAML conversion in your browser. Paste on either side, convert, format, and copy—no upload. Uses js-yaml with noRefs so anchors do not leak into output; validate production configs in the runtime that will load them.
How to use
For YAML → JSON: load the YAML example or paste your file on the right, then click YAML → JSON. For JSON → YAML: use the pre-filled JSON or Load JSON example, then JSON → YAML. Agents can prefill with ?yaml= / ?yamlb= or ?json= / ?jsonb=.
Limits
Multi-document streams, custom tags, and YAML merges may not round-trip through JSON. After conversion, open JSON Schema validate when the JSON side must match a published contract.
JSON & YAML
?
JSON → YAML uses JSON.parse then yaml.dump. YAML → JSON uses yaml.load with the default schema, then JSON.stringify.
Anchors, custom tags, or multiple documents may not round-trip exactly—validate output for production configs. Agent links can prefill either panel with yaml / yamlb or json / jsonb.
149 characters total
Bidirectional: paste YAML on the right for YAML → JSON, or use the pre-filled JSON and click JSON → YAML. Parsing uses js-yaml in your browser.
Nearby workflows on Toolcore
- JSON formatter — after YAML → JSON to normalize indentation before commit or review.
- JSON Schema validate — when the converted JSON must match an API contract.
- TOML ↔ JSON — for teams that keep service config in TOML instead of YAML.
- Compare JSON — to diff two exports once both sides are strict JSON.
Common use cases
- Turn GitHub Actions, Kubernetes, or docker-compose YAML into JSON for tools that only accept strict JSON.
- Export JSON API responses or fixtures to readable YAML for human-edited config repos.
- Format either panel after pasting minified JSON or messy indentation from a terminal.
- Prefill both sides from agent links when an automation needs a human to review the conversion in a tab.
Common mistakes to avoid
Assuming every YAML feature maps 1:1 to JSON
YAML anchors, merges, and custom tags may not round-trip. Validate complex files in the environment that will consume them.
Mixing up YAML 1.1 truthy strings and booleans
In YAML 1.1, values like yes, no, and on can become booleans when parsed. After JSON → YAML → JSON, check that flags still match what your service expects.
Using this page for multi-document streams
Paste one document at a time. Separate --- documents or exotic tags may need your deployment runtime’s parser instead.
FAQ
Does this support both YAML to JSON and JSON to YAML?
Yes. Use YAML → JSON when the source is on the right panel, or JSON → YAML when the source is on the left. Either direction can be formatted and copied.
Are documents uploaded?
No. Conversion and formatting run in your browser.
Which YAML version does the parser follow?
The page uses js-yaml with the default schema, matching typical Node tooling. Edge cases in exotic YAML should be verified in your deployment runtime.
Can I validate the JSON side against a schema?
Do that on the JSON Schema validate tool after conversion—this converter only checks parseability, not business rules.
Common search terms
Phrases people search for that match this tool. See the full long-tail keyword index.
- yaml to json converter
- json to yaml online
- convert yaml file to json
- free yaml json converter
More tools
Related utilities you can open in another tab—mostly client-side.
JSON ↔ XML
ClientBidirectional convert; format or minify XML locally.
TOML ↔ JSON
ClientTOML to JSON and JSON to TOML online—format, validate, convert locally.
JSON ↔ KDL
ClientKDL Documents ↔ JSON-shaped node arrays—bidirectional locally with kdljs.
JSON ↔ MessagePack / CBOR
ClientEncode JSON to MessagePack or CBOR and decode binary (Base64) back—compact APIs and IoT payloads in the browser.