DataHub Tools TOML Formatter JSON

TOML Formatter and TOML to JSON

Local-first

Format simple TOML config and convert it to JSON locally in your browser.

How this tool actually works

The page loads smol-toml 1.7.0 locally for TOML parsing and serialization. It supports quoted keys, dates, multiline strings, nested tables, inline tables, arrays, and arrays of tables, and rejects invalid or duplicate definitions.

  • Parse standards-compliant TOML
  • Format validated TOML
  • Convert parsed values to JSON

How to use it

  1. Paste TOML and run Format for normalized TOML output.
  2. Use To JSON when you need a JSON representation.
  3. Review date serialization and numeric precision when crossing data models.
  4. Download the result with a TOML or JSON filename that matches the current output.

Quick example

Example input

[app]
name = "DataHub"
active = true
ports = [80, 443]

Expected result

{
  "app": {
    "name": "DataHub",
    "active": true,
    "ports": [80, 443]
  }
}

TOML dates and special numeric values may not have a one-to-one JSON representation; inspect converted values before replacing a configuration file.

Best use cases

  • Inspect a deliberately simple TOML snippet.
  • Convert a small basic configuration draft to JSON.
  • Reformat supported scalar and section syntax.

References and scope

TOML 1.0 defines the source grammar; JSON conversion necessarily maps TOML values into JSON-compatible serialized values.

Sources checked July 24, 2026. Specifications and platform behavior can change; verify the sources before formal use.

Known limitations

  • Parsing and formatting run locally after the versioned vendor bundle loads.
  • Invalid and duplicate definitions produce an error and clear the old output.
  • JSON output downloads as config.json; TOML output downloads as config.toml.

FAQ

Which parser is used?

The browser loads smol-toml 1.7.0 locally.

Are dates and multiline strings supported?

Yes. They are parsed according to the TOML library, but inspect their JSON representation.

Are duplicate keys accepted?

No. Invalid duplicate definitions produce an error.

Which filename is downloaded?

TOML output uses config.toml and JSON output uses config.json.