YAML / TOML Converter
Paste JSON, YAML or TOML and convert it to either of the other formats. Nested objects and arrays round-trip cleanly, parse errors report the exact line and column, and values a format cannot express (like functions in TOML) are reported as errors instead of being silently dropped. YAML output never wraps mid-line. Runs entirely in your browser.
About this tool
One converter for the three config formats: paste JSON, YAML or TOML, pick the source and target, and get the equivalent document. Conversions parse first and serialize second, so the output is always a faithful re-encoding of the same data — nested objects and arrays round-trip cleanly. Parse failures report the exact line and column, and values a target format cannot express (a function or undefined reaching TOML, for example) are reported as errors instead of being silently dropped. YAML output never wraps mid-line.
When to use it
Questions
Does the conversion go through JSON?
Yes, internally everything is normalized to JavaScript values and re-encoded, which is why the result is always valid in the target format. The trade-off is that format-specific quirks — YAML anchors and aliases, TOML datetime tags — become plain data on the way through.
Why won't my YAML string stay on one line?
It will. This tool sets yaml's line width to unlimited, so long values are never folded or wrapped mid-line the way many default YAML dumpers do.
What cannot be represented in TOML?
TOML has no null, undefined or function value. Data containing those is rejected with an error naming the type, rather than emitting a placeholder that would change the meaning of the document.