Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

JSON to YAML Converter API

Convert JSON to YAML or YAML to JSON.

POST /api/v1/tools/json-yaml-converterMCP json_yaml_converterData & Conversion

Convert JSON to YAML or YAML to JSON instantly in your browser. Supports anchors, multi-document YAML and block strings, with clear error messages and line numbers.

Input

Send these as a JSON object. Unknown fields are rejected.

input
JSON or YAML text. (string, required)
to
Target format. (string, one of yaml, json, required)
curl https://pithlab.com/api/v1/tools/json-yaml-converter \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"input":"{\"service\":\"billing\",\"replicas\":3,\"enabled\":\"yes\"}","to":"yaml"}'
Example response
{
  "ok": true,
  "result": {
    "output": "service: billing\nreplicas: 3\nenabled: \"yes\"",
    "warnings": []
  }
}