Skip to main content
KalkuNet

TOML to JSON — TOML 1.0 Parser with Error Locations and a Typed Mode

Parse [table] TOML configuration files into clean structured JSON.

Runs in your browserDeveloper · JSON, YAML, TOML, XML & CSV Converters
JSON form:
  • Datetimes, local dates and local times become RFC 3339 strings; hex, octal and binary integers are written as decimals without losing digits.

When to use the TOML v1.0 to Formatted JSON Converter

  • Complete table rules

    A table defined twice, a dotted key that reopens another table, or an inline table extended later is rejected with its line and column, just as Python's tomllib does.

  • Tested with toml-test

    The parser passes the 553 TOML 1.0 cases of toml-test: 182 valid documents match the expected typed values, and 371 broken documents are rejected at the same position as tomllib.

  • Dates and numbers intact

    Datetimes, local dates and local times are written as RFC 3339 text. Hex, octal and binary integers become decimals without losing digits.

  • Typed mode

    The typed mode writes each value as a {"type", "value"} object like the toml-test format, so datetimes, floats and integers stay distinguishable in JSON.

Frequently asked questions

Why is my inline table rejected?

In TOML 1.0 an inline table must fit on one line without a trailing comma. Write long tables as [tables].

How does a datetime differ from a local date?

A datetime with an offset such as 2026-11-23T08:30:00+07:00 points at one exact moment. Local datetimes, dates and times carry no time zone, so the typed mode marks them as datetime-local, date-local and time-local.

Is the key order kept?

Yes. Keys are written in the order they appear in the TOML file.

Are TOML 1.1 features supported?

Not yet. The parser follows TOML 1.0.0, so the \e and \xHH escapes and multi-line inline tables of TOML 1.1 are rejected.

Is my file uploaded?

No. Parsing runs in your browser.

Learn more