Overview
Convert TOML to JSON or JSON back into TOML, using @iarna/toml - a spec-compliant TOML parser and serializer - rather than a hand-rolled implementation. TOML is meaningfully more complex than INI: it has nested tables, array-of-tables ([[section]] syntax for repeated table entries), inline tables, typed values including native dates, and multiple numeric formats (hex, octal, binary, underscore separators), all of which a from-scratch parser risks mishandling silently on real-world files. Useful for reading a Cargo.toml, pyproject.toml, or other TOML config as JSON for scripting, or generating a TOML file from a JSON config object. Note that JSON has no native date type, so a date that started as a real TOML date becomes a plain string after a JSON round-trip rather than converting back to a native TOML date automatically. Runs entirely client-side.
Best for: Reading a Cargo.toml or pyproject.toml config file as JSON for scripting
How to use this tool
- Pick a direction. Switch between TOML → JSON and JSON → TOML with one click.
- Paste your input. Drop in a TOML config file or a JSON object.
- Read the converted output. Nested tables, arrays of tables, and typed values are all handled by the underlying spec-compliant parser.
- Swap and repeat. Use the swap button to feed the output straight back in as new input.
Why use this tool
Spec-compliant parsing
Handles TOML’s full feature set - nested tables, array-of-tables, inline tables, typed dates - rather than a partial hand-rolled parser.
Catches real TOML syntax errors
Malformed TOML is rejected with a specific parser error rather than silently misparsed.
Handles Cargo/pyproject-style configs
Works cleanly with the kind of real-world TOML files Rust, Python, and other modern toolchains actually use.
Nothing leaves your browser
Conversion happens entirely client-side - useful when the config contains real credentials or connection details.
Frequently asked questions
The underlying parser is spec-compliant, so a failure usually means the input has a genuine syntax error - an unclosed string, a malformed table header, or a value that doesn’t match TOML’s expected types. The error message names the specific problem the parser hit.
TOML has a native date/time type, but JSON doesn’t - a TOML date becomes a JSON string after conversion. Converting that JSON back to TOML will keep it as a quoted string rather than automatically restoring it as a native TOML date, since there’s no reliable way to tell a date-shaped string from an intentional string value.
TOML supports nested tables, array-of-tables, inline tables, multiple numeric formats, and native dates - enough interacting syntax features that a hand-rolled parser risks silently mishandling real-world config files rather than failing loudly. A spec-compliant parser avoids that risk.