Convert YAML to JSON
Converting YAML to JSON is two steps on this page: drop the .yaml file into the dropzone and click Convert to JSON. The parsing is done by js-yaml running locally in your browser, so the document is transformed on your own machine without ever being uploaded.
Runs in your browser. Your file never leaves your device.Drop your YAML hereChoose a YAML to convert
It becomes a JSON right in your browser, up to 100 MB
Your file never leaves your device
Works in airplane mode. See the proof
Limits, published exactly
| Where it runs | In your browser. The file never leaves your device. |
|---|---|
| Free conversions | Unlimited. No account, no ads, no queue, no watermark. |
| Max file size, free | 100 MB |
Why convert YAML to JSON?
The common situation is a tool or API that only speaks JSON while your config is written in YAML. YAML is pleasant to write and read, but plenty of programs, endpoints and validators expect JSON specifically and will reject anything else. Converting hands them the same data in the format they accept, with no manual retyping. It is also handy when you want to pipe a human-maintained YAML config into a script: parse it once here, get clean JSON, and feed that to whatever downstream code only knows how to load JSON.
What is YAML?
YAML is a human-friendly data format built for configuration: indentation instead of braces, comments, and a clean look that made it the default for Kubernetes, Docker Compose, and CI pipelines. It maps one to one onto JSON, so the two convert losslessly. People reach for YAML when a human has to read and edit the file by hand.
What is JSON?
JSON is the lingua franca of APIs and config: nested objects and arrays in a compact, human-readable text form that almost every language can parse. It handles structured and hierarchical data that a flat table cannot. For tabular data it is often paired with CSV, and for configuration with YAML.
Quality and what to expect
The core data is preserved: keys, values and nesting all come through, and the output is pretty-printed with 2-space indentation so it stays readable. The honest catch is that YAML has features JSON simply has no place to put. Comments are not part of the data model, so they are dropped. Anchors and aliases, which YAML uses to reuse a block, are resolved into their expanded values rather than kept as references, and any YAML-specific niceties vanish in the JSON. So the data survives intact; the YAML-only annotations and shorthand that were never data in the first place do not.
YAML to JSON FAQ
Do my YAML comments survive the conversion?
No. Comments are not part of the data a YAML parser produces, so they cannot be represented in JSON and are dropped. Only the actual keys, values and structure carry over into the JSON output.
What happens to anchors and aliases?
JSON has no equivalent for them, so they are resolved during parsing: each alias is expanded into the value it pointed at. The data ends up correct, but the reference shorthand itself is not preserved in the JSON.
How is the JSON formatted?
It is pretty-printed with 2-space indentation rather than minified onto one line, so the result is easy to read and diff. If a tool needs compact JSON you can minify it afterwards in any editor.
Is the YAML file uploaded to be parsed?
No. js-yaml runs as JavaScript inside this browser tab, so your config is parsed locally and the JSON is produced on your device. Nothing about the file crosses the network during the conversion.