# Convert YAML to JSON

Paste YAML and get JSON back. Free, no signup, and nothing you paste is stored. The same conversion is available as an API call and to AI agents over MCP.

- Tool: [yaml-to-json](https://setget.net/tools/yaml-to-json.md)
- Endpoint: `POST https://setget.net/v1/tools/yaml-to-json`
- Page: https://setget.net/convert/yaml-to-json

## YAML and JSON

- YAML: YAML holds the same kind of data as JSON using indentation instead of brackets, and allows comments. Kubernetes, Docker Compose and CI systems use it for configuration. Indentation mistakes change the meaning, and unquoted words such as no or on can turn into true or false.
- JSON: JSON is the data format of web APIs: nested objects, lists, text, numbers, true, false and null. It has no comments and is tiring to write by hand.

## What happens in this conversion

- What is lost: Comments are dropped, because JSON has nowhere to put them. Anchors and aliases are expanded into full copies.
- Surprises: YAML turns unquoted words such as yes, no, on and off into true or false, and version numbers such as 1.10 into numbers. Check the result, and quote those values in the YAML if they should be text.
- One document: A file holding several documents separated by --- is not accepted. Convert each one separately.

## Questions

**Is my YAML stored anywhere?** No. It is converted in memory and discarded. It is not saved or logged.

**How much YAML can I convert at once?** Up to 1 MiB in a single request.

**Can a script or an AI agent convert YAML to JSON?** Yes. Call POST https://setget.net/v1/tools/yaml-to-json with JSON, or use the run_tool tool of the SetGet MCP server with slug "yaml-to-json". The code samples on this page are ready to copy.
