How to Convert YAML to JSON Online
- Paste YAML or open a .yaml / .yml file.
- Choose indentation and how to handle multiple documents.
- Copy the JSON or download it as a .json file.
YAML to JSON Converter Features
- Error locations: line, column and a snippet for every YAML error.
- Multi-document files: combine --- separated documents into an array.
- Formatting options: 2 or 4 spaces, tabs or minified JSON.
- Open and download files: .yaml/.yml in, .json out.
- Private: parsed in your browser with js-yaml.
- Free forever: no trial, no paywall and nothing added to your files.
- Privacy-first: files and text never leave your computer or phone.
- Any device: desktop or mobile, in Chrome, Safari, Edge or Firefox.
YAML vs. JSON
| YAML | JSON |
|---|
| Comments | Yes (#) | No |
| Structure | Indentation | Braces and brackets |
| Multi-line strings | | and > blocks | \n escapes |
| Multiple documents | Yes (---) | No |
| Typical use | Config files | APIs, data exchange |
Common YAML Errors
- Tabs used for indentation – YAML only allows spaces.
- Inconsistent indentation inside a list or mapping.
- A colon inside an unquoted value, such as
title: Note: read me – wrap the value in quotes. - Values like
no, yes or on becoming booleans in older YAML 1.1 parsers – quote them if they are text.
Who Uses the YAML to JSON Converter?
- DevOps engineers converting Kubernetes and Compose files
- Developers loading YAML config into JavaScript apps
- API designers converting OpenAPI specs
See also: JSON to YAML (the reverse conversion).
Frequently Asked Questions
Are YAML comments kept?
No. JSON has no comment syntax, so comments are dropped during conversion.
What happens to dates?
Dates such as 2026-11-17 are kept as strings, so the JSON looks exactly like your YAML value instead of being converted to a timestamp.
Can I convert JSON back to YAML?
Yes – use our JSON to YAML converter for the reverse direction.
Does it support anchors and aliases (& and *)?
Yes. Anchors and aliases are resolved, so the JSON contains the full copied values.
Is my data uploaded?
No. The conversion runs in your browser with JavaScript, so your files and text stay on your device. Nothing is sent to our server.
Why does indentation matter so much in YAML?
YAML uses indentation instead of brackets to show which keys belong together. A single extra or missing space can move a key into a different object, so the converter reports the exact line where the structure breaks.