Data Conversion · REST API

JSON to YAML & YAML to JSON API

Convert structured JSON into readable YAML and transform YAML documents into pretty-printed JSON through two dedicated REST endpoints.

Free tier available. Both endpoints require a JWT Bearer Token.

Conversion capabilities

Nested structures

Convert nested objects, arrays and scalar values while retaining data hierarchy.

Data types preserved

Maintain numeric, boolean and structured values during conversion.

Readable output

Generate readable YAML with minimal unnecessary quoting or pretty-printed JSON.

Convert JSON to YAML

Send a valid JSON document. The API generates YAML suitable for common configuration formats and parsers.

Endpoint

POST /api/v1/convert/data/json-to-yaml

Input: application/json · Output: application/yaml

Short example

Input

{
  "server": {
    "port": 8080,
    "compression": {
      "enabled": true,
      "mime-types": ["application/json", "text/html"]
    }
  }
}
						

Output

server:
  port: 8080
  compression:
    enabled: true
    mime-types:
      - application/json
      - text/html
						

The request body must contain valid JSON. Conversion is structural only; no execution occurs.

JSON to YAML in Swagger

Convert YAML to JSON

Send a valid YAML document as raw text. Objects, arrays and scalar root values are supported; the response is pretty-printed JSON.

Endpoint

POST /api/v1/convert/data/yaml-to-json

Input: text/plain · Output: application/json

Short example

Input

server:
  port: 8080
  compression:
    enabled: true
    mime-types:
      - application/json
      - text/html
						

Output

{
  "server": {
    "port": 8080,
    "compression": {
      "enabled": true,
      "mime-types": [
        "application/json",
        "text/html"
      ]
    }
  }
}
						

The request body must contain valid, non-empty YAML. Invalid or empty input returns 400 Bad Request.

YAML to JSON in Swagger

When to use these APIs

Configuration workflows

Convert JSON configuration data into readable YAML for CI/CD pipelines, Docker Compose and Kubernetes.

JSON-based integrations

Transform YAML configuration files into JSON for APIs and systems that expect JSON input.

Explore more DevHub APIs

Browse the API catalog or consult interactive documentation for request and response details.

loader