JSON ⇄ YAML ⇄ TOML
Convert config data between JSON, YAML, and TOML in any direction. Runs in your browser; nothing is uploaded.
About this tool
JSON ⇄ YAML ⇄ TOML converts configuration data between the three most common config formats, in any direction. Pick the From and To formats, paste your data, and get the converted result.
- All six directions are supported: JSON↔YAML, JSON↔TOML, and YAML↔TOML.
- The data round-trips through a shared model, so structure and values are preserved.
- Pretty-print indents JSON and TOML output (on by default).
Everything runs locally in your browser via WebAssembly — your config is never uploaded.
Notes on TOML
TOML is stricter than JSON/YAML: the top level must be a table (object), and
TOML has no null. Converting a top-level array or a document containing
null to TOML will report a clear error.
Handy for
- Moving a config between tools that prefer different formats (e.g.
Cargo.toml↔ a JSON build config). - Reading a TOML file as JSON, or vice-versa.
FAQ
Why does converting to TOML fail when JSON and YAML accept my data?
TOML is the strict one of the three: the document root must be a
table/object (a top-level array like [1, 2, 3] has no TOML
representation) and TOML has no null. Either condition produces a clear
error instead of a mangled file — wrap the array under a key, or replace
nulls, and the conversion goes through.
Do comments and YAML anchors survive the conversion?
No. The input is parsed into a pure data model (maps, lists, scalars) and
re-emitted, so # comments in YAML/TOML are dropped, and YAML anchors/aliases
(&base / *base) are expanded into their concrete values in the output.
Keys, values, nesting and types are what round-trips.
What exactly does the Pretty-print switch do?
It controls indentation of JSON and TOML output — on (the default) gives human-readable, indented output; off gives compact single-line JSON, handy for embedding in an environment variable or HTTP body. YAML is inherently indented, so the switch doesn't change it.
Is it safe to paste configs with secrets in them?
Yes — the conversion runs entirely in your browser via WebAssembly. API keys, connection strings and other config values never leave your device; nothing is sent to a server or logged.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool json-yaml-convert '{ "title": "demo", "server": { "port": 8080 } }' 'from=json' 'to=json'New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/json-yaml-convert/?input=%7B%20%22title%22%3A%20%22demo%22%2C%20%22server%22%3A%20%7B%20%22port%22%3A%208080%20%7D%20%7D&from=json&to=json&pretty=trueMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
