TOML to JSON
POST
/v1/convert/toml-to-json
curl -X POST "https://convert.toolkitapi.io/v1/convert/toml-to-json" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"toml": "[project]\nname = \"myapp\"\nversion = \"1.0.0\""}'
# See curl example
// See curl example
Response
200 OK
{
"json": {
"project": {
"name": "myapp",
"version": "1.0.0"
}
},
"size": 48
}
How to Use
1
Send a POST request to /v1/convert/toml-to-json with a toml string.
About This Tool
Parse TOML configuration into a JSON object. Supports all TOML types including tables, arrays of tables, inline tables, datetime values, and multi-line strings.
Ideal for reading pyproject.toml, Cargo.toml, or any TOML-based configuration programmatically.
Why Use This Tool
- Build Tool Integration — Parse pyproject.toml or Cargo.toml to extract project metadata in your build pipeline.
- Config Management — Read TOML configuration files as JSON for use in APIs and services.
Frequently Asked Questions
Are datetime values preserved?
TOML datetime values are converted to ISO 8601 strings in the JSON output.
What about inline tables?
Inline tables and regular tables are both converted to JSON objects — the output is identical.
Start using TOML to JSON now
Get your free API key and make your first request in under a minute.