YAML to JSON Converter
Runs locallyParse single or multi-document YAML into formatted JSON with line-level diagnostics.
What is YAML to JSON Converter?
Parse YAML 1.2 documents, Kubernetes manifests, and GitHub Actions workflows into strict JSON. Detects indentation and anchor errors with exact line numbers.
How to use YAML to JSON Converter
- Step 1
Paste YAML into the input editor or drop a .yml/.yaml file.
- Step 2
Select output JSON indent (2 spaces, 4 spaces, or minified).
- Step 3
Copy or download the converted JSON.
Features
- YAML 1.2 compliant parser with anchor and alias resolution
- Multi-document YAML stream support
- Exact line and column syntax diagnostics
- Configurable JSON indentation or compact output
- Lossy-conversion warning when comments are stripped
- Swap button to convert JSON back to YAML
Example
Input
name: nexatools ports: - 80 - 443
Output
{
"name": "nexatools",
"ports": [
80,
443
]
}YAML sequences and mappings become standard JSON arrays and objects.
Frequently asked questions
Does it support YAML anchors and aliases?
Yes, YAML anchors (&name) and aliases (*name) are resolved into JSON values.
Why did my YAML fail to parse?
YAML prohibits tab indentation and requires a space after colons; the Problems panel marks the exact line.
Is my YAML config sent to a server?
No, parsing happens locally in your browser.
Can I convert the output to TypeScript?
Yes, click Open in JSON to TypeScript below the output editor.
Related tools
JSON to YAML Converter
Convert JSON to YAML and back with indent, flow style, key sorting and lossy warnings.
JSON Formatter & Validator
Format, validate, minify, repair, sort keys and query JSON with Tree and Table views.
JSON to TypeScript Converter
Generate TypeScript interfaces, types, Zod schemas, Kotlin, Swift, Dart and Go models.