TOML to JSON

Indent:
{
  "title": "ToolsContainer",
  "version": "1.0.0",
  "debug": false,
  "server": {
    "host": "localhost",
    "port": 3000,
    "timeout": 30
  },
  "database": {
    "host": "localhost",
    "port": 5432,
    "name": "toolscontainer",
    "ssl": true
  },
  "features": [
    {
      "name": "TOML to JSON",
      "enabled": true,
      "priority": 1
    },
    {
      "name": "YAML to JSON",
      "enabled": true,
      "priority": 2
    }
  ],
  "limits": {
    "max_file_size_mb": 10,
    "requests_per_minute": 60,
    "tags": [
      "free",
      "converter",
      "utility"
    ]
  }
}

✓ Valid TOML — converted successfully

TOML Quick Reference

Stringname = "Alice"
Integerport = 5432
Floatpi = 3.14
Booleandebug = false
Arraytags = ["a", "b"]
Table[section]
Array of tables[[items]]
Comment# this is a comment

About TOML to JSON

TOML to JSON converts TOML configuration files into JSON format, enabling interoperability between TOML-based tools and JSON-consuming applications. TOML is popular in Rust (Cargo.toml), Python (pyproject.toml), and Hugo projects, and this converter makes it easy to inspect, transform, or migrate that data. The tool faithfully preserves tables, arrays, inline tables, and all TOML data types.

Key Features

  • Parses all TOML v1.0 features including tables, array of tables, and inline tables
  • Preserves data types such as strings, integers, floats, booleans, dates, and times
  • Converts dotted keys into properly nested JSON objects
  • Handles multi-line basic and literal strings correctly
  • Outputs formatted JSON with consistent indentation for easy readability
  • Reports TOML syntax errors with line numbers and descriptive messages

How to Use TOML to JSON

  1. 1

    Paste your TOML content

    Copy the contents of your Cargo.toml, pyproject.toml, Hugo config, or any TOML file and paste it into the input area.

  2. 2

    Click Convert

    Press Convert to parse the TOML data and generate the equivalent JSON structure.

  3. 3

    Review the JSON output

    Verify that tables have been converted to nested objects and that arrays, data types, and dotted keys are represented accurately.

  4. 4

    Copy or download the result

    Use the copy button to grab the JSON for pasting into your project, or download it as a .json file for further processing.

Common Use Cases

Rust Project Inspection

Convert Cargo.toml into JSON to programmatically inspect dependency versions, feature flags, and workspace configurations using standard JSON tools.

Python Project Configuration

Transform pyproject.toml into JSON for validation against schemas or for processing with JSON-based tooling in build pipelines.

Static Site Generator Migration

Convert Hugo or other SSG TOML configuration files into JSON when migrating to a framework or tool that expects JSON-based configuration.

Why Use Our TOML to JSON

TOML-to-JSON converters are surprisingly hard to find online, and most lack support for advanced TOML v1.0 features like array of tables and dotted keys. This tool handles the full specification including datetime types and inline tables, all client-side with no installation. Ideal for Rust and Python developers who need to quickly inspect or transform Cargo.toml and pyproject.toml files.

Project Configs Parsed Locally

TOML to JSON conversion runs completely in your browser without transmitting data anywhere. Your Cargo.toml dependency trees, pyproject.toml build configurations, and Hugo site settings — which may reference private registries or internal packages — are never exposed to external services. Inspect project configurations with full confidentiality.

Learn More

Frequently Asked Questions

How are TOML tables converted to JSON?
TOML tables become nested JSON objects. A [database] table with a port key becomes {"database": {"port": 5432}} in JSON. Dotted keys like database.port are also expanded into the same nested structure.
Does the converter handle TOML datetime types?
Yes. TOML date, time, and datetime values are converted to their ISO 8601 string representations in JSON, since JSON has no native date type. The original precision and timezone information are preserved.
What happens with TOML array of tables?
TOML's [[array_of_tables]] syntax is converted into a JSON array of objects. Each [[section]] entry becomes an element in the array, maintaining the order they appear in the original file.

Last updated: April 6, 2026