About this tool
Convert YAML to JSON in the browser — anchors and aliases resolved, multi-document files handled, output formatted your way.
This converter turns YAML 1.2 into RFC 8259 JSON entirely in your browser, resolving anchors, aliases and merge keys the way a YAML loader does rather than by text substitution. Multi-document streams separated by --- become a JSON array, duplicate keys are rejected as the spec requires, and you choose 2-space, 4-space, tab or minified output. It is built for developers converting Kubernetes manifests, CI pipelines and app config into JSON for APIs, scripts or schema validation.
Open YAML to JSON Converter on AltFTool — it loads instantly in your browser.
Paste or upload your source content.
Choose the target format or conversion mode.
Copy or download the converted result.
Aliases and << merge keys expand to their final values, exactly as a YAML 1.2 loader sees them.
Streams with --- separators convert to one JSON array with a per-document count.
Duplicate keys and recursive aliases are reported as errors instead of producing silently wrong JSON.
Yes — anchors (&), aliases (*) and merge keys (<<) are resolved during parsing, so the JSON contains the final expanded values. JSON has no reference syntax, which means shared nodes are duplicated in the output; a recursive alias is reported as an error because JSON cannot represent a cycle.
Almost, because JSON is a subset of YAML 1.2, but not perfectly in reverse. YAML values JSON lacks — .inf and .nan become null, comments are dropped, and non-string mapping keys are coerced to strings. This tool flags each such substitution instead of hiding it.
Each document separated by --- is parsed separately and the result is a single JSON array with one element per document. A file with one document converts to that value directly, not wrapped in an array.
Because the YAML specification requires mapping keys to be unique, and silently keeping the last value — what many loose parsers do — hides real configuration bugs. Find the repeated key on the reported line and remove or rename one of the entries.
Add the YAML to JSON Converterwidget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/yaml-to-json-converter"
title="YAML to JSON Converter — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/yaml-to-json-converter?utm_source=embed&utm_medium=widget">AltFTool — free online tools</a></p>