YAML to JSON Converter
Convert YAML to JSON and JSON to YAML instantly. Paste a config, Kubernetes manifest or API response — conversion happens in your browser and nothing is uploaded.
Free · No sign-upHow to use YAML to JSON Converter
- 1. Paste YAML or JSON into the input box, or load an example.
- 2. Leave Auto-detect on, or force YAML → JSON or JSON → YAML.
- 3. Choose the indent, optionally sort keys A–Z, and decide how several
---documents are handled. - 4. Copy or download the result, or use it as the new input to convert back. Errors show the exact line and column.
Frequently asked questions
How do I convert YAML to JSON?
Paste your YAML into the input box. The converter parses it with js-yaml and writes formatted JSON on the right as you type. Pick 2 or 4 spaces, a tab or minified output, then copy or download the .json file.
Can I convert JSON back to YAML?
Yes. Paste JSON and auto-detect switches to JSON → YAML, or choose it yourself. Strings that YAML could misread, such as “yes” or “1.0”, are quoted automatically.
What happens to YAML comments and anchors?
JSON has no comments, so they are dropped. Anchors and aliases are expanded into full copies, and merge keys are applied, so the JSON contains the final values.
Does it support multiple YAML documents?
Yes. Files with several documents separated by --- (common in Kubernetes) become a JSON array when the option is ticked; otherwise only the first document is converted and you get a notice.
Why does yes stay a string?
The converter follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 tools treated yes, no, on and off as booleans, which caused the well-known “Norway problem”. Quote values if you need to be explicit.
Is my data private?
Yes. Parsing runs in your browser with an open-source library loaded from a public CDN. Your text is never sent to a server, and share links only contain your settings.