How to use
- Click Paste to load TOML from your clipboard, or Upload to choose a .toml or .txt file.
- Under Output, choose Indent 2, Indent 4 or Minify.
- Set Dates and times to Reject, or choose Convert to strings to allow TOML dates and times.
- Check the automatically updated result; for large inputs, click Convert when it appears.
- Click Copy to copy the JSON or Download to save it as a file.
Examples
Cargo.toml package and dependencies
[package]
name = "inventory-api"
version = "0.1.0"
edition = "2021"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1", features = ["full"] }{
"package": {
"name": "inventory-api",
"version": "0.1.0",
"edition": "2021"
},
"dependencies": {
"serde": {
"version": "1.0",
"features": [
"derive"
]
},
"tokio": {
"version": "1",
"features": [
"full"
]
}
}
}Product records as minified JSON
[[products]] name = "Claw hammer" sku = 738594937 price = 19.95 [[products]] name = "Box of nails" sku = 738594938 price = 4.50
{"products":[{"name":"Claw hammer","sku":738594937,"price":19.95},{"name":"Box of nails","sku":738594938,"price":4.5}]}Schedule with dates and a UTC offset
[schedule] starts_at = 2026-10-05T09:30:00-04:00 deadline = 2026-10-09 opens_at = 08:00 local_reminder = 2026-10-08T16:30:00
{
"schedule": {
"starts_at": "2026-10-05T09:30:00.000-04:00",
"deadline": "2026-10-09",
"opens_at": "08:00:00.000",
"local_reminder": "2026-10-08T16:30:00.000"
}
}How TOML types become JSON
| TOML | JSON |
|---|---|
| String (basic, literal, multi-line) | string |
Integer (42, 0xDEADBEEF, 1_000) | number, exact (64-bit and larger) |
Float (1.0, 6.02e23) | number, keeps .0 |
inf, nan | error — JSON has no infinity |
| Boolean | boolean |
| Array, table, inline table, array of tables | array, object |
| Date, time, date-time | error by default, or an ISO 8601 string |
FAQ
Which TOML version is supported?
The tool parses TOML 1.1.0 with smol-toml 1.9.0 and also accepts TOML 1.0 files. Supported 1.1 features include multiline inline tables with trailing commas, the \e escape and times without seconds.
Does converting TOML to JSON preserve large integers?
Integers are written digit for digit, so 9223372036854775807 stays exact in the JSON text. Hexadecimal, octal and binary integers become decimal numbers.
Why won't my TOML convert to JSON?
Duplicate keys, redefined tables and syntax errors stop conversion and show a line and column. Values such as inf, nan and overflowing floats such as 1e400 also fail because JSON cannot represent them; use a string or a finite number instead.
Is my TOML file uploaded or saved?
Conversion runs in your browser, and the tool does not upload your TOML or JSON. The input is not saved; option settings are stored in localStorage. Google Analytics receives tool events, but not your TOML or JSON.
What is the file size limit?
Files larger than 10 MB are rejected, as are binary and non-UTF-8 files. Pasted text has no explicit size limit, but your browser's available memory can limit processing.