YAML to JSON
Convert YAML into clean JSON, right in your browser.
Runs in your browser — nothing is sent or saved.
How to convert YAML to JSON
- Paste your YAML in the left box.
- The JSON version appears on the right as you type.
- If the YAML has a mistake, a clear message shows what went wrong.
- Press Copy JSON.
Why convert YAML to JSON
YAML is easy for people to write, so config files and CI pipelines often use it. But many programs and APIs want JSON. This tool bridges the two: you keep writing in friendly YAML, then convert to the JSON a tool expects. Lists, nested blocks, numbers, and quoted text all carry across.
Indentation is everything in YAML
YAML uses indentation to show structure, the way curly braces do in JSON. Two spaces in means one level deeper. The one rule people forget: you must use spaces, never tabs, to indent in YAML. A stray tab is the most common reason a file fails to parse. Keep your spacing even and the conversion will be clean.
What comes out
The result is standard JSON with two-space indenting, ready to copy into a program or an API call. YAML features that JSON does not have, such as comments, are dropped, because JSON cannot hold them. The data itself stays the same.
FAQ
Why does my YAML fail with a tab error?
YAML does not allow tabs for indenting. Replace the tabs with spaces and convert again.
Do YAML comments survive?
No. JSON has no comments, so any # note is dropped in the conversion. The data is kept.
Can it handle lists and nested blocks?
Yes. Lists become JSON arrays and nested blocks become nested objects, at any depth.
Is there a size limit?
No. The conversion runs on your device, so large files work. A very large file may take a moment on an older phone.
Is my data uploaded?
No. Everything runs in your browser and nothing is stored.
Are YML and YAML files different?
No. A .yml file is the same format with a shorter file ending, so yml to JSON works exactly the same here. The YAML converter reads either ending.