Skip to content
POST /api/v1/json-to-yaml

JSON to YAML Converter

Paste JSON to convert it to YAML format. Great for creating Kubernetes manifests, Docker Compose files, Ansible playbooks, and CI/CD pipeline configs. Customize indentation and inline depth.

string required
advanced options
string

Number of spaces per indent level

number

Depth at which to switch to inline YAML (higher = more expanded)

X-Sandbox-Remaining: - get an api key

returns

data.yaml
The converted YAML.
data.line_count
Number of lines in the YAML.
data.keys
Count of keys in the input.
response awaiting request sending
Fill in the fields and send a request. The response lands here.

Run it from your code

A temporary key takes one request and lasts seven days at 20 calls a day. Register and it becomes 75 a day, still free.

$ curl -sX POST "https://apixies.io/api/v1/json-to-yaml" \
    -H "X-API-Key: $APIXIES_KEY" \
    -H "Content-Type: application/json" \
    -d '{"json":"..."}' | jq '.data.yaml'

questions

What is the inline level setting?

It controls at what nesting depth YAML switches from expanded (one key per line) to inline ({key: value}) notation. Higher values mean more expanded output. Default is 10, which keeps most structures expanded.

Does it handle arrays correctly?

Yes. JSON arrays become YAML sequences with dash notation (- item). Nested arrays and mixed types are fully supported.

What about special YAML values?

JSON null becomes YAML null, true/false stay as booleans, and numeric strings are properly quoted if needed to prevent YAML type coercion.

cookies

We use analytics cookies to see how the site gets used. Nothing loads until you accept. Privacy policy