🔄 YAML ↔ JSON Converter
Convert YAML to JSON or JSON to YAML in one click. Paste your data and Toolio auto-detects the format, or pick the direction yourself; choose the JSON indent (2, 4, tab, or minified) and copy or download the result. Powered by the js-yaml library bundled locally — everything runs in your browser with no upload and full offline support.
Private by design. This tool runs entirely in your browser — nothing you enter is uploaded or stored, and it works offline.
About
YAML and JSON describe the same data model, so conversion is lossless for standard documents — YAML's readable, indentation-based syntax becomes strict JSON and vice-versa. This tool is handy for DevOps and developers moving between Kubernetes manifests, CI pipelines, and API payloads. It reports precise parse errors (line and reason) when the input is malformed, and never sends your configuration — which may contain secrets — to any server.
How to use
- Paste YAML or JSON into the input box.
- Leave Direction on 'Auto-detect' or choose YAML→JSON / JSON→YAML explicitly.
- Optionally set the JSON indent, then click Convert.
- Copy the output or download it as a .json / .yaml file.
FAQ
- Is my data uploaded to a server?
- No. Conversion happens entirely in your browser using a locally bundled library — safe for configs with secrets.
- Does it support multi-document YAML or comments?
- It converts a single document. YAML comments are not represented in JSON, so they're dropped on conversion — that's inherent to the formats.
- What happens if my YAML or JSON is invalid?
- You'll get a clear parse error describing the problem so you can fix it quickly.
- How does the automatic direction detection work?
- The converter inspects the text and picks the direction for you, which covers the usual case of pasting something and just wanting the other format. When the input is ambiguous - a short snippet that is valid as both - you can force the direction explicitly with the YAML-to-JSON or JSON-to-YAML setting rather than leaving it to guess.
- Why would I choose an indent of 0?
- That produces compact single-line JSON, which is what you want for a config value, an environment variable or an API request body where whitespace is wasted. Use two or four spaces for anything a person will read, and tab indentation when the project you are pasting into is tab-based - mixing the two is the usual cause of a noisy diff.
- Are comments and anchors preserved?
- No, and they cannot be. JSON has no syntax for either, so comments are dropped on the way out and YAML anchors are expanded into the full value they referred to. Converting a commented config to JSON and back therefore returns working data but loses the notes - keep the YAML original if the comments matter.