Skip to main content
File & Data Conversion Tools

TOML to JSON Converter

Convert TOML configuration files to JSON - supports tables, arrays, strings, numbers, booleans, and arrays of tables.

Paste your TOML content below - this tool parses common TOML syntax and converts it to JSON.

This supports TOML's commonly-used syntax (tables, arrays, arrays of tables, basic value types) - unsupported or invalid syntax is reported clearly rather than silently producing wrong output.

What TOML Syntax Is Supported?

Key-value pairs, [table] and nested [table.subtable] headers, [[array.of.tables]], strings, integers, floats, booleans, and inline arrays - the syntax most real-world TOML configuration files (like Cargo.toml or pyproject.toml) actually use.

How to Use It

  1. Paste your TOML content.
  2. Click Convert.
  3. Copy or download the resulting JSON.

Limitations

Some less common TOML features (multi-line strings, inline tables, datetime values with full RFC 3339 precision) may not be fully supported - unsupported syntax is reported as a clear parse error rather than silently producing incorrect output.

Example

[project]
name = "invoice-kit"
version = "1.4.0"
dependencies = ["requests", "jinja2"]

[tool.pytest]
addopts = "-q"

becomes:

{
  "project": {
    "name": "invoice-kit",
    "version": "1.4.0",
    "dependencies": [
      "requests",
      "jinja2"
    ]
  },
  "tool": {
    "pytest": {
      "addopts": "-q"
    }
  }
}

Dotted table names such as [tool.pytest] become nested objects.

Why Convert TOML to JSON?

  • Reading pyproject.toml or Cargo.toml values from a JavaScript tool or a CI script.
  • Checking exactly how a TOML file is structured when a tool reports a confusing error.
  • Moving configuration into a system that only accepts JSON.

Common TOML Mistakes

  • Strings must be quoted: name = invoice-kit is invalid; name = "invoice-kit" is correct.
  • A table can only be defined once - two [database] headers is an error.
  • Use [[servers]] (double brackets) for a list of tables, not repeated [servers].

Convert back with JSON to TOML, or format the result with the JSON Formatter.

Frequently Asked Questions

In configuration files like pyproject.toml, Cargo.toml, Hugo and Netlify configuration.

Each [table] becomes a nested object, and [[array of tables]] becomes an array of objects.

JSON has no date type, so dates and times are output as strings.
Share this tool: