name: Anvil version: 2 tags: - dev - tools active: true
About JSON to YAML & YAML to JSON Converter
Convert JSON to YAML and YAML to JSON without leaving your browser. Paste an API payload, a Kubernetes manifest, or a CI config and flip it between the two formats instantly — types are preserved, anchors are expanded, and the result is pretty-printed and ready to copy.
This JSON ↔ YAML converter is built on a spec-compliant YAML 1.2 parser, so booleans, nulls, numbers, and nested structures round-trip cleanly instead of turning into strings. It's the quick bridge devs reach for when moving config between tools that speak different formats.
Everything runs locally and fully offline: nothing you paste is uploaded, which makes it safe for production configs, secrets, and sensitive payloads.
Features
- JSON → YAML and YAML → JSON in both directions, with a one-click toggle
- Scalar types preserved — true/false, null, integers, and floats stay typed
- YAML anchors and aliases (&a / *a) are expanded into concrete values
- Pretty-printed output, copy-ready; runs entirely offline in your browser
How to use
- Paste your JSON or YAML into the input pane.
- Choose JSON → YAML or YAML → JSON with the direction toggle.
- Read the converted result in the output pane and copy it — or clear and start again.
Frequently asked questions
Are data types preserved when converting?
Yes. Booleans, null, integers, and floats keep their native types in both directions, because the converter parses to real JavaScript values rather than treating everything as text. Strings that look like other types (e.g. "true" or "42") are quoted in YAML so they stay strings.
Does it expand YAML anchors and aliases?
It does. YAML anchors (&name), aliases (*name), and merge keys (<<) are resolved into concrete values when converting to JSON, so the output reflects the fully-expanded document.
What happens if my JSON or YAML is invalid?
The output pane shows a clear parse error — including the line number when the parser can report one — instead of crashing or producing garbage. Fix the highlighted spot and the conversion re-runs as you type.
Is my data uploaded anywhere?
No. All parsing and conversion happen locally in your browser. Your input never leaves your device, so the tool works offline and is safe for sensitive configs and secrets.
Related tools
Everything runs locally in your browser — your input is never uploaded.