# YAML to JSON Guide

Convert YAML documents to JSON.

- Tool: https://ilham.dev/tools/yaml-to-json/
- Guide URL: https://ilham.dev/guides/yaml-to-json/
- Tool guides index: https://ilham.dev/guides/tools/
- Broader guide: Working With Structured Data (https://ilham.dev/guides/working-with-structured-data/)

## What it does

Convert YAML to JSON, preserving nesting, arrays and types. Anchors and aliases are resolved, so the output is the effective document rather than the shorthand used to write it.

## Use the tool

Open https://ilham.dev/tools/yaml-to-json/, add the input the tool asks for, run it, and check the output before using it elsewhere.

## Input and output

- Input: text.
- Output: text.
- Category: Formats.

## Privacy and processing
Processing happens locally in your browser. This tool does not upload the input to ilham.dev.

## Questions

### What happens to a non-string key?

JSON requires string keys, so numeric and boolean keys are converted to their string form. That is a real difference between the two formats, not a bug.

### Are duplicate keys allowed?

No. YAML permits them but almost every parser takes the last one silently, which hides mistakes. This tool reports them instead.