Skip to content
POST AI agent ready /v1/yaml/to-json

YAML to JSON API - Free Online Converter

Parse a YAML string and return the equivalent JSON representation. Handles nested structures, arrays, anchors, aliases, and multi-line strings.

Parameters

stringrequired

The YAML string to convert.

Code examples

curl -X POST https://api.botoi.com/v1/yaml/to-json \
  -H "Content-Type: application/json" \
  -d '{"yaml":"name: botoi\nversion: 2.1.0\nfeatures:\n  - hashing\n  - uuid"}'

When to use this API

Kubernetes manifest processing

Convert Kubernetes YAML manifests to JSON for programmatic manipulation, validation, or feeding into kubectl with --output=json.

CI/CD config migration

Convert GitHub Actions or CircleCI YAML configs to JSON when migrating to tools that expect JSON input.

Frequently asked questions

Are YAML anchors and aliases supported?
Yes. The parser resolves YAML anchors (&) and aliases (*) into their expanded form in the JSON output.
Does this handle multi-document YAML?
The API processes the first document in a multi-document YAML stream. Separate documents with --- are not split into multiple JSON objects.
How are YAML tags handled?
Custom YAML tags (e.g., !include) are ignored. The value is parsed as its native type.
What happens with duplicate keys?
Duplicate keys in the same mapping overwrite earlier values, matching the YAML 1.2 specification behavior.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.