---
title: "YAML to JSON"
method: POST
path: "/api/v1/tools/yaml-to-json"
tags: ["tools"]
---

# YAML to JSON

`POST /api/v1/tools/yaml-to-json`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/yaml-to-json`
- Auth: HTTP bearer

Parse YAML text and return both the value and its JSON text. Reads maps, lists, inline [lists] and {maps}, quoted and block scalars and comments. Anchors, aliases, merge keys, tags and multi-document files are not supported and are reported with the line number.

## Request body

- object
  - `yaml` string
  - `indent` integer

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `value` object
      - `name` string
      - `tags` string[]
      - `port` integer
    - `json` string

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
