How to use
Run a clean first pass
- Paste YAML or JSON into the left input panel.
- Use the ⇄ swap control to pick the direction (YAML → JSON or JSON → YAML).
- Click Convert — parse errors show the failing line below the input instead of a blank panel.
Two-way YAML ↔ JSON conversion in your browser — nested structures, multiline blocks, and inline line-number errors.
輸入
YAML
YAML → JSON
輸出
JSON
JSON is a subset of YAML — meaning every valid JSON file is also valid YAML. This tool uses the bundled js-yaml library (MIT) to parse YAML locally in your browser, then serializes output via JSON.stringify or yaml.dump. No data leaves your device.
The parser uses js-yaml's load() (safe mode) and dump(), handling nested maps and sequences, quoted strings, multiline literal (|) and folded (>) blocks, null, boolean, numbers, and basic anchors (&name) and aliases (*name). Parse failures show a line/column hint instead of a blank panel.
Out of scope: complex YAML 1.1 merge-key resolution, JSON Schema or YAML Schema validation, large-file streaming (keep under ~500 KB), file upload, and other formats like TOML or XML.
Quick guide
Compact below-tool notes that help first-run users and repeated visitors move faster without changing the main interface.
Chinese search: YAML 轉 JSON、JSON 轉 YAML、YAML JSON 轉換、YAML 轉換器、線上 YAML 轉 JSON
Japanese search: YAML JSON 変換、JSON YAML 変換、yaml to json、yaml パース、yaml json 相互変換
How to use
Examples
FAQ
No. All parsing and conversion happen locally using the bundled js-yaml (MIT) library and the native JSON parser. Nothing is sent to any server.
Yes. It handles nested maps, sequences, quoted strings, multiline literal (|) and folded (>) blocks, null, boolean, and number scalars.
The output panel clears and an inline message appears below the input with the parser's line/column (when available) plus a plain-language hint — never a silent blank result.
Basic anchors (&) and aliases (*) are expanded, and an Anchor Resolution Trail panel lists each anchor and where it was referenced. Complex YAML 1.1 merge-key resolution is out of scope.