YAML to JSON
Convert YAML into JSON, with clear errors for invalid documents.
Nothing converted yet
Paste YAML on the left to see the JSON it resolves to — including how each unquoted value was typed.
Runs entirely in your browser. Your data isn't uploaded — this page makes no network request with anything you type, which you can verify in your browser's network tab. How this works.
What is the YAML to JSON?
Going from YAML to JSON is the direction where things can go wrong, because YAML is a much larger language: anchors, aliases, multiple documents in one stream, block scalars, and implicit typing rules that turn unquoted values into numbers, booleans or nulls.
This converter parses the YAML properly, resolves anchors, and shows you the resulting JSON so you can see exactly how each value was typed — which is often the answer to "why did my config load as a boolean?".
How to use it
- Paste YAML into the left editor, or upload a .yaml / .yml file.
- Press Convert (or Ctrl/Cmd + Enter).
- If the document fails to parse, the error includes the line and a short explanation of what the parser expected.
- Pick formatted or minified JSON output, then copy or download it.
Example
YAML with implicit typing, converted to explicit JSON.
enabled: yes version: "3.10" replicas: 3
{
"enabled": true,
"version": "3.10",
"replicas": 3
}
Features
- Anchors and aliases resolved
- Multi-document streams converted to a JSON array
- Block and folded scalars handled correctly
- Parse errors reported with line numbers
- Formatted or minified JSON output