Developer Tools
JSON ↔ YAML
Convert JSON to YAML or YAML to JSON with automatic direction detection, configurable indent, and precise error positions when the document is malformed.
- Input
- fmtText
- Output
- TEXT
- Runs
- Your browser
shortAnswer
ToolBoxAll's JSON ↔ YAML converter detects the direction from the first non-space character, converts with js-yaml's safe schema, and lets you set the indent from 2 to 8 spaces. Anchors and merge keys are expanded into plain values; comments are dropped.
- keyFact
- Automatic direction detection
- keyFact
- Safe schema — no custom tags executed
- keyFact
- UTF-8 output, no escaping of Chinese
reviewedOn 2026-11-20
Output
Output appears here as you run the tool.
Tip: this tool runs entirely in your browser — your input never leaves the device.
How it works
three steps- 01
Paste JSON or YAML; the direction is detected for you.
- 02
Pin the direction if the document starts ambiguously.
- 03
Copy the result straight into your config file.
About this tool
Parsing uses js-yaml's safe schema, so no custom tags are executed. Direction is guessed from the first non-space character ({ or [ means JSON), and can be pinned manually. YAML anchors and merge keys are resolved to plain values on the way out, which is what most config reviews need.
| Input | fmtText |
|---|---|
| Output | TEXT |
| Batch | One at a time |
| Per-file limit | — |
| Processing | Your browser |
| Account | Not required |