TOML to JSON Converter
Paste TOML configuration and instantly convert it to JSON. Supports all TOML features including tables, arrays of tables, inline tables, and multi-line strings.
Last updated: May 28, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is TOML to JSON Converter?
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read and write for humans. It is commonly used for project configuration files like Cargo.toml (Rust), pyproject.toml (Python), and config.toml (Hugo, Gitea).
JSON is a universal data exchange format that is widely supported across all programming languages and APIs. Converting TOML to JSON is useful when you need to pass configuration data to a JSON-only API, import TOML config into a tool that only reads JSON, or compare configurations across formats.
This tool performs a complete TOML parse and re-serializes the result as JSON, preserving all data types: strings, integers, floats, booleans, dates, arrays, and nested tables.
How to Use TOML to JSON Converter
Paste your TOML content into the input area or click "Load Sample"
Choose the JSON indentation size (2 or 4 spaces)
The JSON output appears instantly on the right
If there is a parse error, the line number is highlighted
Copy or download the JSON output
Common Use Cases
- Rust developers converting Cargo.toml dependency lists to JSON for tooling.
- Python developers exporting pyproject.toml configuration to JSON for CI pipelines.
- DevOps engineers converting TOML-based config files to JSON for Kubernetes or Terraform.
- Developers migrating configuration from TOML-based apps to JSON-based platforms.
- API integrations where the upstream is TOML but the downstream requires JSON.
Example Input and Output
A TOML config file with tables and arrays is converted to its JSON equivalent.
[package]
name = "my-app"
version = "1.0.0"
authors = ["Alice <[email protected]>"]
[database]
server = "127.0.0.1"
port = 5432
enabled = true
[[servers]]
ip = "10.0.0.1"
role = "primary"
[[servers]]
ip = "10.0.0.2"
role = "replica"{
"package": {
"name": "my-app",
"version": "1.0.0",
"authors": ["Alice <[email protected]>"]
},
"database": {
"server": "127.0.0.1",
"port": 5432,
"enabled": true
},
"servers": [
{ "ip": "10.0.0.1", "role": "primary" },
{ "ip": "10.0.0.2", "role": "replica" }
]
}Privacy
All conversion runs in your browser. No data is uploaded to any server.
Frequently Asked Questions
What TOML features are supported?
All standard TOML v1.0 features: basic strings, literal strings, multi-line strings, integers (decimal, hex, octal, binary), floats (including inf/nan), booleans, offset date-times and local dates/times, arrays, tables, inline tables, and arrays of tables.
Are TOML dates converted to JSON strings?
Yes. JSON has no native date type, so TOML date-time values are preserved as ISO 8601 strings in the JSON output.
Can I convert JSON back to TOML?
Yes — use the JSON to TOML Converter tool to go in the other direction.
Is this tool safe for sensitive data?
Yes. All conversion runs entirely in your browser. Your TOML is never sent to any server.
What is the difference between TOML and JSON?
TOML is designed for human-editable config files: it supports comments, multi-line strings, and native date types. JSON is designed for data interchange: it is more compact and universally supported in APIs and programming languages. They serve different purposes but represent similar key-value data structures.
Related Tools
TOML Validator
Validate TOML 1.0 input and view the parsed structure as JSON. Reports the line number of the first syntax error with a clear message.
JSON to TOML Converter
Convert JSON to TOML 1.0 — table headers for nested objects, [[array of tables]] for arrays of objects, inline tables for short structures, and proper key quoting.
YAML to JSON Converter
Convert YAML to JSON and JSON to YAML — for config files, CI pipelines, and Kubernetes manifests.
JSON Formatter
Format, validate, and beautify JSON instantly — with clear error messages, Tree View, Diff mode, and Schema validation.
JSON Validator
Validate JSON syntax online. Shows valid/invalid status, error location (line and column), and structure stats including type, key count, and depth.
XML to JSON Converter
Parse and convert XML to clean JSON instantly — attributes, namespaces, and nested elements handled.

