TOML to JSON Conversion
Convert TOML data to JSON format. Useful for API integration and config compatibility. Enter text or upload a file (up to 100KB) and see real-time conversion results.
How to use
About this tool
Converts TOML strings to JSON.
How to use
Paste TOML; the JSON output can be copied.
Use cases
• Converting TOML (e.g. Cargo.toml) to JSON for APIs/tools • Unifying config formats • Readability and processing
Code Examples
1# Comments are ignored
2[package]
3name = "my-app"
4version = "1.0.0"
5
6[database]
7host = "localhost"
8port = 5432
9enabled = true
10
11[[servers]]
12host = "api.example.com"
13[[servers]]
14host = "cache.example.com"1{
2 "package": {
3 "name": "my-app",
4 "version": "1.0.0"
5 },
6 "database": {
7 "host": "localhost",
8 "port": 5432,
9 "enabled": true
10 },
11 "servers": [
12 { "host": "api.example.com" },
13 { "host": "cache.example.com" }
14 ]
15}How it works
■ What is TOML? TOML (Tom's Obvious, Minimal Language) is a human-readable format for config files. It supports key=value pairs, [sections], arrays, and types such as dates, integers, floats, and booleans. It is widely used in Rust (Cargo.toml), Python (pyproject.toml), and elsewhere. ■ What is JSON? JSON (JavaScript Object Notation) represents key-value pairs, arrays, and nested objects as text. It is commonly used for API requests/responses and data exchange. ■ How conversion works The tool parses the TOML string into an intermediate object, then serializes it to formatted JSON (2-space indent). Date and datetime values are output as ISO 8601 strings. All processing runs in the browser.
Privacy and data
Conversion runs entirely in the browser; TOML and JSON are never sent to a server.
