Convert YAML to JSON
APIs and JavaScript code expect JSON, but the config you're working from is often YAML. This converter parses YAML and emits formatted JSON you can drop straight into a request body or a fetch call.
name: Devkult stars: 1280 tags: - tools - dev open_source: true
{
"name": "Devkult",
"stars": 1280,
"tags": [
"tools",
"dev"
],
"open_source": true
}Try it with your own data
Output will appear here…Frequently Asked Questions
What is YAML?
YAML (YAML Ain't Markup Language) is a human-readable data serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted.
Why convert between YAML and JSON?
YAML is often preferred for human editing due to its clean syntax, while JSON is the standard for data exchange between web services. Converting between them is common when moving from configuration to API consumption.
How to convert YAML to JSON
- Paste or type your YAML.
- The converter parses the YAML structure.
- It outputs the equivalent JSON, pretty-printed with two-space indentation.
Frequently asked questions
Will comments survive the conversion?
No. JSON has no comment syntax, so YAML comments are dropped. Only the data is converted.
Does it handle nested YAML and lists?
Yes. Nested maps become nested JSON objects and YAML lists become JSON arrays, preserving the full structure.