Format or minify a TOML subset in the browser. Related pages: YAML · INI
TOML is a common config format. This page reprints a useful subset into a steady layout, or strips comments and blank lines. YAML and INI have their own pages: YAML and INI.
title = "TOML", enabled = true, an [owner] table whose name is Ada, a [database] table with ports = [8000, 8001], and two [[products]] tables named Hammer and Nail.Comments start with #. Keys may be bare, quoted or dotted. Tables use [name], and arrays of tables use [[name]]. Strings may be basic, literal or multiline. Numbers may be integers, floats, hex (0x), octal (0o), binary (0b) or digits with underscores. true and false, arrays and inline tables are read. An ISO date or time is kept as the original token, and so is a hex, octal or binary number.
Format writes simple keys first, then [tables], then [[arrays of tables]]. Comments are removed. A literal string is written back as a basic quoted string. An array of objects is written with [[name]]. Minify is the same text without the blank line before each table.
Format and Minify both drop comments. They are not data in the parsed document.
Hex, octal, binary and date tokens are reprinted as written, not converted to decimal.