Illustration of a YAML block converting to and from an equivalent JSON block

YAML ↔ JSON Converter

Paste YAML or JSON below and convert either direction. Parsing YAML isn't practical in a browser without an external library, so this one round-trips to the server to convert — nothing is stored, the request/response is the only place it exists. Avoid pasting real secrets if that matters to you.


ℹ️ About this converter
  • Uses Python's PyYAML on the server — the only tool on this site that round-trips plain text for its core function rather than staying fully client-side, because there's no practical way to parse full YAML in browser JS without an external library.
  • Nothing is logged or stored: the pasted content only exists for the duration of the request.
  • "Sort keys" alphabetizes object keys in the output; otherwise the original key order is preserved.
💻 Show API usage example (cURL)
curl -sS "https://devops.majbase.com/yaml-json-converter/api" \
    --data-urlencode 'direction=yaml-to-json' \
    --data-urlencode 'text=name: my-app
replicas: 3'

Returns {"result": "..."}, or {"error": "..."} for malformed input. Use direction=json-to-yaml for the other way; optional sort_keys=true and indent=2|4 (yaml-to-json only).