Enter YAML
Paste your YAML configuration in the left editor — supports multi-document (--- separator) and anchor references.
Try different keywords
No results found
Type YAML on the left to generate JSON, or type JSON on the right to generate YAML
Paste your YAML configuration in the left editor — supports multi-document (--- separator) and anchor references.
The converted JSON appears instantly on the right. Bidirectional sync is supported — editing JSON also updates YAML.
Click the copy button to get the JSON result, or check the compress option to minimize output size.
name: WaLudo"name": "WaLudo"- item1 / - item2["item1", "item2"]Indentation{ "parent": { "child": ... } }true / false / yes / notrue / falsenull / ~ / emptynull| (keep) / > (fold)"string with \n"# commentNot supported, lost&alias / *aliasExpanded to actual value--- separatorNot supported, split to array2026-06-10"2026-06-10" (string)YAML is common in Kubernetes, Docker Compose, GitHub Actions, and other config files. Converting it to JSON makes it easier for programs and APIs to consume.
JSON is the default data exchange format for Web APIs and frontend apps. Converting YAML to JSON helps reduce syntax mistakes in hand-written configuration.
Bidirectional conversion is useful for config migration, checking equivalent data structures, and quickly generating copyable examples.
const yaml = require('js-yaml');
const json = JSON.stringify(yaml.load(yamlStr), null, 2);import yaml, json
json.dumps(yaml.safe_load(yaml_str), indent=2)import "gopkg.in/yaml.v3"
yaml.Unmarshal([]byte(yamlStr), &data)
json.MarshalIndent(data, "", " " )let value: Value = serde_yaml::from_str(yaml_str)?
serde_json::to_string_pretty(&value)yq -o=json config.yaml > config.jsonYAML and JSON are both popular data serialization formats. JSON uses braces and double quotes with strict syntax, making it ideal for network transmission and API communication. YAML uses indentation for hierarchy and supports comments and richer data types (dates, multi-line strings), making it popular for configuration files like Docker Compose, Kubernetes, and CI/CD pipelines.
In Node.js, use the js-yaml library: const yaml = require('js-yaml'); const json = JSON.stringify(yaml.load(yamlString), null, 2); This site uses js-yaml to do exactly that in your browser. Python users can use pyyaml, and command-line users can try yq. See the code comparison table below for multi-language examples.
No. All data on this site is processed locally in your browser. YAML parsing, JSON generation, formatting, and minification all happen entirely on your device. No user data is ever uploaded, saved, or logged.
YAML has some surprising behaviors: (1) NO, YES, ON, OFF are parsed as booleans (the Norway problem) — quote them to keep as strings; (2) leading zeros like 01234 are treated as octal in YAML 1.1; (3) YAML anchors and aliases (&anchor / *alias) are expanded during conversion since JSON has no reference syntax; (4) JSON does not support comments, so all YAML comments are lost after conversion.
Perform a round-trip test: convert the output JSON back to YAML and compare with the original input. You can also use our JSON formatting tool to validate the JSON structure. For complex configurations, verify semantic equivalence between the input and output data.