JSON to TOML
This JSON to TOML converter produces clear, semantic TOML config. TOML is designed for configuration files, and its [section] table structure is more explicit than YAML. The tool pre-emptively flags data TOML cannot express — such as an array root or null fields — with the field path, and computation runs locally so nothing is uploaded.
How to use it
- 1
Paste object-form JSON
A TOML document root must be a table, so paste JSON in the form of key-value pairs.
- 2
Review the semantic hints
If the input contains null fields or an array root, the tool points out the exact path; adjust it and the conversion reruns instantly.
- 3
Copy the TOML
Standard TOML with [section] headers is produced on the right; paste it into your config file.
- 4
Verify in a target project
Paste the output into a TOML parser (such as Cargo) to confirm it reads as expected.
Key features
Tables and array tables
Nested objects become [section.sub] headers and arrays of objects become [[section]] array tables, making the structure obvious.
Explicit null handling
TOML has no null type, so instead of silently dropping the field the tool reports its path and suggests a fix.
Non-ASCII needs no escaping
Strings are written as UTF-8, so non-ASCII text and emoji need no unicode escapes.
Line and column errors
JSON syntax errors are highlighted inline, while semantic errors such as an array root explain the cause and the fix.
TOML 1.0 output
The generated text follows the TOML 1.0 specification and is readable by common parsers in many languages.
Local and private
Conversion runs in your browser and the data is not uploaded.
Common errors & troubleshooting
- ! A TOML root must be a table: change an array root like [1, 2, 3] into { items = [1, 2, 3] }.
- ! TOML cannot express a null value, so change the field to an empty string "" or remove it; the error message gives the full path.
- ! TOML strings use double quotes, and content containing quotes or newlines is escaped correctly.
- ! Non-ASCII keys are written as-is, so keep them consistent with the rest of your config.
Frequently asked questions
Why does a null field error instead of being ignored?
Silently dropping a field makes the config inconsistent with the source data and is costly to debug. The tool points out the path, such as $.server.host, so you can knowingly replace it with an empty string or remove the field.
How does TOML differ from an INI file?
TOML inherits the INI table structure but has a real type system: strings must be quoted, and numbers, booleans, arrays, dates and nested array tables have standard syntax, so not every value is a string as in INI.
Can the generated TOML be used in a Rust or Go project?
Yes. The output follows the TOML 1.0 specification and can be read by Cargo.toml and TOML parsing libraries in many languages.
Is my config uploaded?
No. Conversion happens locally in your browser.
Related tools
TOML to JSON
Convert TOML such as Cargo.toml or app config to standard JSON. Tables and array tables are expanded, dates become ISO strings and integers outside the safe range are flagged. Runs locally.
JSON to YAML
Convert JSON to YAML while keeping the original structure, in a format that is easier to read and comment. Conversion errors point to the source position.
YAML to JSON
Convert YAML to JSON online. Anchors, merge keys and flow syntax are expanded and parsed under the YAML 1.2 core schema, avoiding implicit-type traps such as yes/no and dates. Runs locally.
JSON Formatter
Format, beautify and validate JSON in your browser. Errors point to the exact line and column, and you can indent with 2 spaces, 4 spaces or a tab.