JSON to YAML
json-to-yaml · version 1.0.0 · YAML, TOML, INI, XML & TSV · free, no key needed
Convert JSON data to a YAML string.
Use when you need to: json to yaml · stringify yaml · convert json to yaml.
Supported
- json to yaml
- stringify yaml
- convert json to yaml
Not supported
- yaml to json
- read files
- write files
Behavior
- Converts valid JSON structured data into a YAML document.
- Output is a standard string format suitable for configuration files.
Input
data(object or array or string or number or boolean or null, required)
Output
yaml(string, required)
Limits
- max input bytes: 262144
- max depth: 20
Example
Request input:
{
"data": {
"name": "Ada",
"city": "London"
}
}
Response:
{
"result": {
"yaml": "name: Ada\ncity: London\n"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "json-to-yaml",
"version": "1.0.0",
"input": {
"data": {
"name": "Ada",
"city": "London"
}
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/json-to-yaml/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"data":{"name":"Ada","city":"London"}}'
The machine-readable contract is at /v1/tools/json-to-yaml/versions/1.0.0.
CLI
node cli.mjs run json-to-yaml 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- JSON to INI: Convert JSON data to an INI string.
- JSON to TOML: Convert JSON data to a TOML string.
- JSON to TSV: Convert a JSON array of objects to a TSV string.
- JSON to XML: Convert JSON data to an XML string.
- YAML to JSON: Convert a YAML string to a JSON object or array.
- INI to JSON: Convert an INI string to a JSON object.