WebToolsPlanet
Converter Tools

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

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What 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

1

Paste your TOML content into the input area or click "Load Sample"

2

Choose the JSON indentation size (2 or 4 spaces)

3

The JSON output appears instantly on the right

4

If there is a parse error, the line number is highlighted

5

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.

TOML input
[package]
name = "my-app"
version = "1.0.0"
authors = ["Alice <alice@example.com>"]

[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"
JSON output
{
  "package": {
    "name": "my-app",
    "version": "1.0.0",
    "authors": ["Alice <alice@example.com>"]
  },
  "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.