YAML to JSON Converter
YAML configuration often relies on indentation instead of braces. This converter reads a single YAML document using the YAML 1.2 core schema, then produces JSON for an API request or a configuration consumer that expects JSON. Maps become objects and sequences become arrays. Strings, booleans, numbers and null values keep their data roles; comments and the original indentation do not survive conversion. Use a representative configuration sample first and compare the resulting types before replacing a working file.
Your workspace
Runs locally in your browserResult
Your input is processed locally in your browser unless explicitly stated otherwise. Inputs are not saved by this tool.
How to use this tool
Paste a single YAML document, choose two or four spaces, and convert. Copy the JSON result or clear both panels.
Example
Input
name: Flutters
active: true
tags:
- dartOutput
{
"name": "Flutters",
"active": true,
"tags": ["dart"]
}What does this tool do?
Indentation establishes nesting. Use spaces consistently: a child key indented under a parent belongs to that parent, while a dash introduces a sequence item. A colon followed by a space separates a mapping key from its value. Quote values such as "true" when you need text rather than a boolean. YAML 1.2 does not treat plain yes and no as booleans in the way some older YAML loaders do.
Common mistakes and limitations
A JSON consumer cannot express every YAML feature. This tool rejects aliases, custom tags, duplicate keys, non-string mapping keys, non-finite numbers and unsafe integer values rather than silently inventing a JSON equivalent. Multi-document streams must be split before conversion. Comments are explanations for humans and do not become JSON properties. Keep the source YAML if those comments carry deployment instructions.
Frequently asked questions
Why are YAML aliases rejected?
Aliases can expand or create shared/cyclic structures. This converter deliberately accepts a simpler JSON-compatible subset.
Related tools
JSON to YAML Converter
Convert valid JSON into readable YAML configuration without uploading data.
Open tool Developer ToolsJSON Formatter & Validator
Format and validate JSON with readable indentation.
Open tool Developer ToolsJSON Minifier
Remove unnecessary whitespace from valid JSON.
Open tool Flutter & Dart ToolsJSON to Dart Converter
Generate null-safe Dart models from a JSON object.
Open tool