TOML-JSON Converter
Convert between TOML and JSON / sections, arrays, inline tables
How to Use
- Choose a mode
Select "TOML → JSON" or "JSON → TOML" from the toolbar.
- Paste input and convert
Paste TOML or JSON into the input area and click "Convert". Use "Swap" to toggle mode and swap input/output.
- Copy result
Use the "Copy" button to copy the converted result to your clipboard.
TOML-JSON Converter Examples
TOML → JSON
[package]
name = "my-app"
version = "1.0.0"
keywords = ["cli", "tool"]{
"package": {
"name": "my-app",
"version": "1.0.0",
"keywords": ["cli", "tool"]
}
}Sections ([table]) are converted as nested JSON objects.
JSON → TOML
{
"server": {
"host": "localhost",
"port": 8080
}
}[server]
host = "localhost"
port = 8080Nested JSON objects are output as TOML sections.
Features
- Bidirectional TOML ↔ JSON conversion
- Parse sections ([table]) and nested tables
- Support strings, numbers, booleans, arrays, inline tables
- Skip comment lines (#)
- Swap button to toggle mode and input/output instantly
- Customizable indent width
- Local processing (your input is not sent to servers)
FAQ
Does it support the full TOML specification?
It covers core syntax (key=value, sections, strings, numbers, booleans, arrays, inline tables). Some advanced features like datetime types and multi-line literal strings have simplified support.
Can it convert Cargo.toml or pyproject.toml?
Yes. Common Cargo.toml and pyproject.toml syntax is supported.
Is my data sent to a server?
No. All conversion happens locally in your browser via JavaScript. Your input data is never transmitted to any external server.