TOML Formatter and JSON Viewer

Paste a TOML configuration to format its supported structures. Review the output: comments are removed and the simplified parser does not preserve every TOML type.

Runs locally in your browser
This tool processes all data locally in your browser.
TOML documentPaste TOML configuration. Basic tables, dotted keys, arrays, strings, booleans and numbers are supported.

How to format TOML and read the JSON view

Paste a TOML configuration, press Format, and the tool rewrites it as one key per line with [section] table headers, shows the same structure as JSON, and reports anything it could not read.

Parsing happens in the page: nothing is uploaded, and a format, copy and clear cycle issues no network requests at all, so the same input can be formatted again offline.

  1. Paste TOML into the source box, or press Load example for a small server / database configuration.
  2. Press Format. The formatted TOML appears in the first panel and the JSON view in the second.
  3. Read the status line and the findings list: a malformed line or a [table] header defined twice is reported with its line number, and the output panels stay empty until the input parses.
  4. Use Copy on the formatted panel; Clear empties the source, both panels, the counters and the status.
  5. The two counters show the number of top-level keys (Summary) and the size of your input (Input).

What the parser accepts, and where it stops

What the parser accepts

Verified against the page: basic tables, dotted keys, arrays that span several lines, arrays of tables ([[products]]), inline tables — also inside arrays — basic and literal strings, integers in decimal, hex, octal or binary form with underscore separators, floats, booleans, and dates or timestamps.

The JSON view mirrors the same structure: TOML numbers become JSON numbers, booleans stay booleans and tables become nested objects, so the formatted text and the JSON panel can be compared line by line.

Known limits

Multi-line strings ("""), inf and nan, and time-only values such as 07:32:00 are rejected with an error instead of being guessed at. Comments are dropped from the formatted output, because a comment cannot be rebuilt from the parsed structure.

Timestamps come back as quoted strings — JSON has no date type — and an array of tables is rewritten as an inline-table array such as products = [{ name = "a" }, { name = "b" }], which is valid TOML for the same value.

Errors and privacy

A missing value, an unreadable value or a [table] header defined twice stops the run with a message that names the line, and the output panels are cleared so an older result is never left looking current. The messages follow the page language.

Everything runs in the browser, and pressing Format with an empty box shows a warning instead of a success status. Large configuration files are handled the same way, since the work is plain text parsing with no request to wait for.

Recent tools: