📄 TOML / INI Converter
Parse and convert between TOML, INI, and JSON formats, with the work done by this page's own script rather than a server.
Last updated: November 8, 2026 · By the BoltQuickTools team
Move settings between TOML, INI and JSON
Config often has to cross formats: a Cargo.toml or pyproject.toml value needed in a script that only reads JSON, or an old .ini file being moved to a newer app. This page converts between JSON and each of the other two, for one file at a time.
Picking a direction
Under Conversion Mode, choose TOML to JSON, JSON to TOML, INI to JSON or JSON to INI, then paste into the input panel. Output updates shortly after you stop typing, and the Convert button runs it on demand. The four sample buttons, such as Sample TOML, load test data and set the matching mode. Copy Output copies the result and the status bar shows any error. TOML and INI errors include a line number; JSON errors are the browser's own message.
There is no direct TOML to INI mode. Go through JSON in two steps.
Example: TOML to JSON
title = "Billing API"
port = 8080
tags = ["prod", "eu"]
started = 2026-03-01T09:00:00Z
[db]
host = "10.0.0.5"
pool = { min = 2, max = 16 }
[[worker]]
name = "mailer"
[[worker]]
name = "reports"
retries = 3
becomes:
{
"title": "Billing API",
"port": 8080,
"tags": [
"prod",
"eu"
],
"started": "2026-03-01T09:00:00Z",
"db": {
"host": "10.0.0.5",
"pool": {
"min": 2,
"max": 16
}
},
"worker": [
{
"name": "mailer"
},
{
"name": "reports",
"retries": 3
}
]
}
In the other direction, JSON to TOML turns {"service":{"name":"auth","port":443},"debug":false,"owner":null} into the output below. Note that owner is gone, because TOML has no null.
debug = false
[service]
name = "auth"
port = 443
What the TOML side changes or misses
The parser covers common TOML but is not a strict validator, so a file passing here may still be rejected elsewhere.
- Dates become strings, as shown above, because JSON has no date type.
- Number types can change.
3.0becomes3,infandnanbecomenull, and integers beyond JavaScript's safe range lose precision:9007199254740993becomes9007199254740992. - Some invalid TOML is accepted. Duplicate keys keep the last value instead of raising an error, a leading zero such as
007is read as 7, and a bare key with a space is cut off, somy key = 1becomes{"my":1}without complaint. - Multi-line strings differ from the spec. The newline right after the opening
"""or'''is kept, a backslash at the end of a line does not join lines, and\uescapes are not decoded inside"""strings. - JSON arrays containing null are a problem.
{"a":[1,null]}writesa = [1, null], which is not valid TOML. When null is the first item, or when an array starts with an object but holds other types, you get "Top-level value must be a JSON object", even though the top level is fine.
What the INI side changes
- Unquoted values are guessed.
version = 1.10becomes the number1.1,zip = 01234becomes1234, andTRUEbecomestrue. Wrap a value in quotes to keep it as text. - Comment characters cut values. A
#or;after a space starts a comment, socolor = #fffgives an empty string. - Sections do not nest.
[a.b]is one key nameda.b. Going the other way, anything deeper than one section is written as a JSON string on one line, and null is written as the wordnull. - The first
=or:splits the line, so a key containing a colon, such as a Windows path, is cut at that colon.
Swap to Input, arrays and YAML
Why did Swap to Input give me a JSON error?
The button guesses the next mode from the output text and sometimes guesses wrong. Output that has no [, such as a = 1, stays in a JSON mode, and TOML starting with a [table] line is mistaken for a JSON array. Pick TOML to JSON or INI to JSON by hand and the text converts normally.
Can the input be a JSON array?
No. Both JSON modes need an object at the top level, since TOML and INI files are key-value documents.
What about YAML?
YAML is handled by the JSON and YAML converter. For help choosing a config format, see the comparison of YAML, TOML and JSON5, and use the JSON formatter to check JSON before converting it.