YAML ↔ JSON Converter
Convert YAML to JSON and back, live as you type. Validation reports the exact line and column of any syntax error, multi-document YAML files become JSON arrays, and the output respects your indentation and key-sorting preferences — all in your browser.
How to use YAML ↔ JSON Converter
- Pick the direction (YAML → JSON or JSON → YAML) and paste your document — conversion is instant.
- Adjust the indent (2/4 spaces, or minified JSON) and toggle key sorting if you want stable ordering.
- Copy the result, or hit Swap to feed the output back in the opposite direction.
Frequently asked questions
- Is my configuration uploaded anywhere?
- No — js-yaml runs entirely in your browser, so secrets in your config files never leave your device.
- What happens to YAML comments and anchors?
- Anchors and aliases are resolved into their actual values. Comments are dropped — JSON has no comment syntax to carry them.
- Does it support multi-document YAML files?
- Yes — documents separated by --- are converted into a JSON array, with a note telling you how many were found.
- How are syntax errors reported?
- YAML errors include the exact line and column from the parser; JSON errors surface the position from the engine — so you can jump straight to the problem.