All tools

TOML Formatter

Data

Format, validate, and convert TOML to/from JSON

Paste a config file like `pyproject.toml` or `Cargo.toml` to reformat it with consistent spacing and get parse errors reported at the specific line where syntax breaks, following the current TOML v1.0.0 spec including tables, arrays of tables, and inline tables. It also converts to and from JSON, handy for feeding the same config into a tool or script that only reads JSON, or scaffolding a new TOML file starting from an existing JSON settings object. One thing that's lost in the round trip: TOML comments have no JSON equivalent, so converting to JSON and back drops any comments the original file had. Parsing, formatting, and conversion all happen locally, with nothing sent anywhere.

tomlformatvalidatejson

How to use TOML Formatter

  • 1.Paste a TOML config file (like `pyproject.toml` or `Cargo.toml`) to get it reformatted with consistent spacing and validated syntax.
  • 2.Convert TOML to JSON when you need to feed the same config into a tool or script that only reads JSON.
  • 3.Convert JSON back to TOML when scaffolding a new config file from an existing JSON settings object.

Frequently asked questions

Which TOML spec version does this follow?
It follows the current TOML v1.0.0 specification, covering tables, arrays of tables, and inline tables.
Does conversion to JSON lose any information, like comments?
Yes, TOML comments aren't representable in JSON, so converting TOML to JSON and back will drop any comments from the original file.
Is my config data sent anywhere?
No, all parsing, formatting, and conversion happen locally in your browser.
Does it catch invalid TOML syntax?
Yes, it reports parse errors with the specific line where the syntax breaks, similar to how a TOML parser library would fail.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/toml-parse \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"input": "[server]\nhost=\"localhost\"\nport=8080"}'

Get an API key from your dashboard · Full API docs →