# YAML to JSON

> Parse YAML and export JSON.

[Open tool](https://www.toolcabana.com/cu/yaml-to-json) · [Developer and data](https://www.toolcabana.com/cu/category/developer-and-data)

Tool ID: yaml-to-json. Requested language: cu. Description language: en. Complete guide translation: no; untranslated sections use English.

## Overview (en)

YAML to JSON converts a single YAML document into JSON formatted with 2-space indentation. Parsing follows the YAML 1.2 core schema, so values such as yes stay strings. Duplicate keys and syntax problems are reported as errors, and alias expansion is capped at 100 to protect against alias bombs.

## Supported tasks (en)

Parse YAML and export JSON.

## Steps (en)

1. Type or paste your source, or load an example.
2. Results update automatically as you edit.
3. Review and copy or download your result. Pause Live results to run manually. Sources or individual settings above 20,000 characters require an explicit run.

## Settings

No additional settings.

## Limitations (en)

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Example input

```text
name: ToolCabana
count: 2
```

## Privacy and connections (en)

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

## Questions (en)

### Does YAML to JSON keep comments?

No. JSON has no comment syntax, so YAML comments are dropped and only the data values appear in the output.

### Can I convert multiple YAML documents at once?

No. The tool reads one document. Input with several documents separated by --- returns an error, so convert each document separately.

### What happens with duplicate keys in YAML?

Duplicate keys in the same mapping are treated as an error that names the line and column, instead of letting the last value silently replace the earlier one.

### Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

### What are the input limits?

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Related tools

- [JSON to YAML](https://www.toolcabana.com/cu/json-to-yaml)
- [CSV to JSON](https://www.toolcabana.com/cu/csv-to-json)
- [XML to JSON](https://www.toolcabana.com/cu/xml-to-json)
- [JSON to CSV](https://www.toolcabana.com/cu/json-to-csv)
