We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
If this tool helped you, you can buy us a coffee ☕
Free online TOML to JSON converter. Easily convert TOML configuration files into JSON format for seamless cross-platform deployment and API integration.
Enter TOML data to generate JSON.

JSON to CSV & CSV to JSON Converter
Convert seamlessly between JSON arrays and CSV tabular data. Ideal for data analysis and software development.

JSON to Java POJO Generator
Automatically convert JSON strings into standard Java POJO class code for API integration, data modeling, and other development scenarios.

JSON to YAML & YAML to JSON Converter
Bidirectionally convert between JSON and YAML structured data formats, with support for custom output styling.

JSON to C# Class Converter
Automatically convert JSON data into C# class definitions, ideal for .NET developers building data models.

JSON to CSV & CSV to JSON Converter
Convert seamlessly between JSON arrays and CSV tabular data. Ideal for data analysis and software development.

JSON to Java POJO Generator
Automatically convert JSON strings into standard Java POJO class code for API integration, data modeling, and other development scenarios.

JSON to YAML & YAML to JSON Converter
Bidirectionally convert between JSON and YAML structured data formats, with support for custom output styling.

JSON to C# Class Converter
Automatically convert JSON data into C# class definitions, ideal for .NET developers building data models.

JSON to XML & XML to JSON Converter
A two-way conversion tool for JSON and XML data structures, designed for development, testing, and data processing.
If a software project's configuration file is written in TOML format (like config.toml), but the deployment system only recognizes JSON, you'll need to convert TOML to JSON. TOML (Tom's Obvious, Minimal Language) is a lightweight format specifically designed for configuration files, commonly found in Rust's Cargo.toml and Python's pyproject.toml. JSON (JavaScript Object Notation) is a data-interchange format supported by almost all programming languages and APIs. In our online converter, simply paste your TOML text into the left input box, click the "Convert" button, and the JSON output will appear on the right.
Primary Example: A standard TOML configuration:
[server]
host = "127.0.0.1"
port = 8080
[database]
name = "testdb"
user = "admin"
password = "secret"
[features]
enable_ssl = true
allow_guests = falsePaste the above content into the "Input TOML" box of the tool, click "Convert", and the right side will display:
{
"server": {
"host": "127.0.0.1",
"port": 8080
},
"database": {
"name": "testdb",
"user": "admin",
"password": "secret"
},
"features": {
"enable_ssl": true,
"allow_guests": false
}
}Comparison Example: TOML containing arrays and datetimes:
title = "Example"
numbers = [1, 2, 3]
created = 2023-08-15T10:00:00ZIn the converted JSON, the datetime becomes a string:
{
"title": "Example",
"numbers": [1, 2, 3],
"created": "2023-08-15T10:00:00Z"
}Note that TOML arrays are preserved as-is, but datetimes are converted to ISO 8601 strings (since JSON does not have a native datetime type).
The successfully converted JSON can be copied and used directly. You should pay attention to a few differences:
a.b.c) will become nested JSON objects.[[items]]) become arrays of objects in JSON, maintaining the same order as they appeared in the original TOML.# comments do not exist in JSON and will be entirely discarded after conversion.If the input TOML has syntax errors (such as duplicate keys or incorrect indentation), the tool will display an error message and will not output JSON.
say = "He asked: "Hello"" should be written as say = "He asked: "Hello"".5 is an integer and 5.0 is a float; JSON will distinguish them accordingly and they cannot be mixed.[[items]] repeated at the beginning and end of the file), the TOML specification will merge them, causing the JSON array order to differ from expectations.2023-08-15T10:00:00Z). If written as 08/15/2023, it will be treated as a regular string.toml2json).Now you can try your own TOML file in the converter above.