Why convert TOML to JSON?
JSON is the universal interchange format for tools, scripts, and pipelines. Converting Cargo.toml or pyproject.toml to JSON makes it trivial to extract fields with jq, feed into a JavaScript build script, or pipe into a tool that doesn’t natively understand TOML.
What does the parser support?
The parser handles the common 80%: basic and literal strings, integers, floats, booleans, RFC3339 datetimes (kept as strings), arrays, inline tables, [tables], [[array of tables]], dotted keys, hex/octal/binary integers, and underscored numbers. For corner cases (multi-line strings, mixed-type arrays in unusual positions) the tool emits a warning and keeps the raw value.
Are dates preserved?
Yes. JSON has no native datetime type, so RFC3339 datetime values are preserved as ISO-8601 strings (e.g. "2024-01-15T10:30:00Z"). When you round-trip back to TOML using our JSON to TOML tool, the ISO format is detected and re-emitted as a datetime.
What about TOML date-time edge cases?
TOML 1.0 has four datetime variants: offset date-time, local date-time, local date, and local time. The parser keeps each as a string in its source format, which preserves precision and timezone information without forcing a JavaScript Date object (which would lose timezone fidelity).
Does it handle Cargo.toml correctly?
Yes — Cargo.toml is the canonical TOML file, and all of its features (sections, dependency inline tables, [[bin]] arrays of tables, profile sub-sections) parse cleanly. Try the Load Sample button to see a Cargo-style file converted.
Why might I see a warning?
Warnings appear when the parser encounters something outside the supported subset: multi-line basic/literal strings, very unusual array nesting, or values it cannot classify. The output JSON still contains the parsed structure — the warning just flags places to double-check.
Is my TOML uploaded?
No. The parser is plain JavaScript that runs in your browser. Open DevTools → Network and confirm — no requests are sent when you click Convert. Cargo.toml files often contain private registry tokens, so this matters.
How does dotted-key syntax convert?
Dotted keys like a.b.c = 1 are converted to nested JSON: { "a": { "b": { "c": 1 } } }. Quoted segments (e.g. "weird.key") become single string keys, not nested levels.