Data Formatters & Converters
Processed locally
JSON ↔ YAML Converter
Paste JSON or YAML — it auto-detects the direction and converts, with a structural safety scan for configs. Everything runs in your browser.
Auto-detects and converts as you type. Ctrl+Enter to re-run.
How to use the JSON ↔ YAML Converter
Convert JSON to YAML and YAML back to JSON for Kubernetes manifests, Helm values, OpenAPI specs, GitHub Actions workflows, Ansible playbooks, and Docker Compose files. The converter auto-detects the input direction, preserves data types and ordering, and produces output that round-trips cleanly. All conversion runs locally in your browser; configs never leave your machine.
What it does
- JSON → YAML conversion with 2-space (default) or 4-space indentation.
- YAML → JSON conversion with proper escaping of strings and preserved numeric / boolean / null types.
- Auto-detects whether the input is JSON or YAML.
- Handles multi-document YAML (separated by
---) and arrays of objects. - Preserves key order and nested structure so configs survive a round trip.
- Reports the exact line/column for parse errors on either side.
When to use it
- Convert a JSON Kubernetes manifest to YAML for
kubectl applyreview. - Switch an OpenAPI spec between
.jsonand.yamlfor tooling that only accepts one. - Convert a YAML CI config to JSON for diffing or programmatic edits.
- Translate Helm
values.yamlto JSON for templating engines. - Convert Docker Compose YAML to JSON for an external orchestrator.
- Prepare configs for tools that expect a specific format.
How to use it
- Paste your JSON or YAML into the input editor (or load from clipboard / file).
- The tool auto-detects the input format and shows the converted output side by side.
- Toggle the conversion direction explicitly if you want to force JSON → YAML or YAML → JSON.
- Pick indentation (2 or 4 spaces) for YAML output.
- Copy or download the result. For Kubernetes, paste the YAML back into your manifest file.
- Run the output through the YAML Validator or JSON Formatter for a final syntax pass.
Tips & pitfalls
- YAML treats
yes,no,on,off,true,falseas booleans — quote them if you want literal strings (a common Kubernetes gotcha). - Leading zeros and numbers like
007may be parsed as octal or stringified — quote where exact representation matters. - Tabs are not allowed for indentation in YAML — only spaces.
- Multi-line strings round-trip best when YAML uses
|(literal) or>(folded) block scalars. - JSON does not have comments; YAML does — comments are dropped when going JSON → YAML → JSON.
FAQ
- How do I convert JSON to YAML online? Paste JSON into the editor — the YAML output appears instantly. Copy or download it.
- How do I convert YAML to JSON? Paste YAML — the tool auto-detects YAML input and produces JSON. Use the toggle to force the direction if needed.
- Is the conversion lossless? Yes for data: keys, values, nested structures, and types round-trip cleanly. YAML-only features (comments, anchors, aliases) are not represented in JSON.
- Does it support Kubernetes and Helm files? Yes — including multi-document YAML separated by
---. Each document is converted to a JSON array entry. - Is my config uploaded? No. Conversion happens entirely in your browser. Nothing is sent to a server or logged.
- What if my YAML has tabs? YAML disallows tabs for indentation — replace them with spaces. The tool flags the offending line.
Runs locally in your browser. No uploads. No analytics on pasted configs.