✅ Copied to clipboard

🔄 YAML/JSON/TOML Converter

Config format translation · Real‑time syntax validation · 6 production examples · Supports up to 10MB

📦
100% client‑side · Privacy safe

All conversions happen in your browser – your config files never leave your device.

📘 YAML
📋 JSON
📦 TOML
🔄 Swap formats
📋 JSON
📘 YAML
📦 TOML
📥

Input

YAML
📤

Output

JSON
📊 0 characters 📏 0 lines
📚

Production examples — click to load

🐳 Docker Compose
Nginx + API + PostgreSQL container orchestration
YAML → JSON
📦 package.json
npm project config with scripts, dependencies, version
JSON → YAML JSON → TOML
🦀 Cargo.toml
Rust project dependencies and compilation settings
TOML → JSON TOML → YAML
☸️ Kubernetes
Deployment + Service manifest
YAML → JSON
⚙️ App config
General application config: database, cache, logging
JSON → TOML JSON → YAML
🔬 Complex data
Nested objects, arrays, mixed types example
YAML → JSON

📖 YAML/JSON/TOML Converter: The Ultimate Config Format Translator

YAML, JSON, and TOML are the three most popular configuration formats in modern software development. ng.cc's online converter enables bidirectional conversion, real‑time syntax validation, precise error location, and includes 6 production‑ready examples such as Docker Compose, package.json, Cargo.toml, Kubernetes. All conversions are performed locally in your browser – zero data upload, max privacy.

🔄 Full‑format conversion

YAML ↔ JSON ↔ TOML, six conversion directions with one click. Handles arrays, nested objects, booleans, nulls.

✅ Real‑time syntax validation

Detects errors as you type, with highlighted lines and precise messages. Supports YAML indentation, JSON brackets, TOML table syntax.

📦 6 production examples

Docker Compose, package.json, Cargo.toml, Kubernetes Deployment, app config, complex data structures.

🔒 Local conversion

Pure JavaScript implementation – your API keys, database passwords, cloud credentials stay in your browser.

🎯 Format comparison

📘 YAML

Pros: Most readable, supports comments, ideal for human‑edited configs (Docker, K8s, Ansible).

Cons: Indentation‑sensitive, slower for large files.

Common uses: docker-compose.yml, kubernetes/deployment.yaml, .gitlab-ci.yml

📋 JSON

Pros: Universal, supported by every language, fast parsing.

Cons: No comments, strict syntax (no trailing commas).

Common uses: package.json, manifest.json, API responses

📦 TOML

Pros: Unambiguous, supports multi‑level tables, no indentation tricks.

Cons: Smaller ecosystem, less widespread than YAML/JSON.

Common uses: Cargo.toml (Rust), pyproject.toml (Python), Wren.toml

💡 Use cases

❓ Frequently Asked Questions

Q1: Will comments be preserved when converting YAML to JSON?
No. JSON does not support comments. All YAML comments (starting with #) are discarded during conversion. TOML supports comments, but they are also lost when converting to JSON. To keep comments, stick with YAML or TOML.
Q2: Why does my YAML output have a different indentation?
This tool outputs YAML with 2‑space indentation, the industry standard (used by Ansible, Kubernetes, Docker Compose). If you need a different indentation, you can adjust it manually after generation. JSON output uses 2‑space formatting; TOML output is not indented.
Q3: Does it support date/time conversion?
Yes. YAML dates like 2026-02-12 become JSON strings; TOML dates like 1979-05-27 also become strings. None of these formats have a native date type, so all dates are handled as strings.
Q4: Can I convert very large files?
This tool runs entirely in your browser, limited by available memory. We recommend keeping files under 10 MB. Files up to 5MB usually convert smoothly. For files larger than 10MB, consider command‑line tools like yq or jq.
Q5: Is my configuration data sent to a server?
Absolutely not. This is a static HTML page – all YAML/JSON/TOML parsing and conversion runs inside your browser's JavaScript engine. You can go offline and it still works. Your database passwords, API keys, cloud credentials never leave your device.
Q6: How does this compare to command‑line tools like yq/jq?
yq/jq are powerful command‑line tools for querying, filtering, and modifying config files – ideal for scripting.
This tool is an online visual converter with no installation, perfect for quick conversions, one‑off debugging, and learning syntax differences. They are complementary; we focus on ease of use and immediacy.

🔗 Recommended Tools

This converter is part of the ng.cc config‑tool collection. You might also like:

⚡ All conversions happen locally – your config files never leave your browser.