⚙️ YAML ↔ JSON
Convert YAML to JSON or JSON to YAML with validation
✓ Free Forever · ✓ No Signup · ✓ No Upload · ✓ Works Offline
🔒 Your data never leaves your device. All processing happens locally in your browser using js-yaml library (client-side). No upload, no server, no tracking.
Features
- Bidirectional Conversion — Convert YAML to JSON or JSON to YAML with a single click.
- Real-Time Validation — Instantly validates your input and shows clear error messages for syntax issues.
- Copy, Download or Open a File — Copy the result, download it named after your file, or open a .yaml / .yml / .json file (or drop it on the box) — a .json file switches to JSON → YAML for you.
- Sample Content — Load sample data to see the conversion in action.
How It Works
- Choose direction — Select YAML to JSON or JSON to YAML.
- Paste your content — Paste YAML or JSON, open a file, or drop one on the input box.
- Copy or download — Get the converted output — validated and formatted.
Use Cases
- Convert Kubernetes YAML configs to JSON for API calls
- Transform JSON config files to YAML for readability
- Validate YAML syntax before deploying configurations
Frequently Asked Questions
Does it support complex YAML features?
Yes: anchors and aliases, merge keys (<<), multi-line strings, and files with several documents separated by --- (they become one JSON array, in order). Custom tags such as CloudFormation’s !Ref or !Sub aren’t standard YAML, so instead of guessing what they mean the tool names the tag and its line.
Is the output formatted?
JSON output is pretty-printed with 2-space indentation. YAML output uses standard formatting with proper nesting.
Will long IDs, prices or dates change?
No. Numbers are copied digit for digit in both directions — 12345678901234567890 stays 12345678901234567890 and 1.10 stays 1.10 (a plain JavaScript conversion would give 12345678901234567000 and 1.1). A date like 2024-01-15 stays that text instead of becoming a timestamp in a time zone the file never stated. Hex and octal numbers (0x1F, 0o14) are written in decimal, since JSON only has decimal, and .inf / .nan become null with a note.
What happens to repeated keys?
In YAML a key may appear only once per mapping, so a repeat is reported with its line instead of being silently dropped. JSON is looser: when a JSON object repeats a key, the last value is kept (as every JSON reader does) and the page lists the repeated keys so you can check them.
Notes from Milo 🐨
I fed this a real config and it quietly changed it: a 20-digit tenant ID came out as a different number, price: 1.10 became 1.1, and a plain date turned into a midnight-UTC timestamp. A Kubernetes file with several documents (---) wasn't converted at all. Now numbers are copied digit for digit both ways, dates stay exactly as you wrote them, several documents become one JSON array, and anything JSON can't hold (.inf, !!binary, a CloudFormation !Ref) is named instead of silently mangled. You can also open or drop a .yaml or .json file, and switching direction carries the result over.
Related Tools
- { } JSON Formatter & Beautifier — JSON pretty-print, beautifier, minifier, and validator — all in your browser
- 📊 CSV ↔ JSON — Convert CSV to JSON or JSON to CSV with custom delimiters
- 📝 Markdown ↔ HTML — Convert Markdown to HTML or HTML to Markdown with live preview
💬 Bug, idea, or just to say hi? Tell Milo 🐨 · [email protected]