TOML to JSON Converter - Free Online Tool
TOML to JSON Converter
Convert TOML configuration files to JSON
TOML 1.0
Reads the full TOML 1.0 syntax: tables, arrays of tables, inline tables, dotted keys, multi-line strings, hex, octal and binary numbers.
Dates and Big Integers
Dates and times keep their TOML form as strings, and integers beyond 2^53 stay exact instead of being rounded.
Precise Errors
A syntax error is reported with its line and column, so a stray quote or missing bracket is easy to find.
Private
Your configuration is parsed in your browser. Nothing is uploaded, which matters for files that hold keys or tokens.
Why Convert TOML to JSON
TOML is a configuration format designed to be easy for people to read and write. It is used by Cargo.toml, pyproject.toml, Hugo, Netlify and many other tools. JSON is what programs, APIs and JSON Schema validators expect, so converting a TOML file is the quickest way to inspect its real structure, feed it to another tool or check it against a schema.
The two formats do not match exactly. TOML has dates and times as real types, JSON does not, so they become strings in their original TOML form. TOML distinguishes integers from floats, and so does this converter: a float such as 72.0 stays 72.0 in the output. TOML allows inf and nan, which JSON cannot hold, so these become the strings "inf" and "nan".
Key Takeaways
- Checked against a reference parser: The output was compared with Python’s tomllib on spec examples and invalid documents.
- Comments are not kept: JSON has no comments, so TOML comments are dropped in the conversion.
- Related tools: Use the JSON to TOML Converter for the reverse direction.