Skip to content
On this page


It is possible to format files in-place or via standard i/o.

taplo fmt foo.toml


cat foo.toml | taplo fmt -


By default Taplo will bail on documents that contain syntax errors to avoid destructive edits, you can use the --force flag to suppress this and try to format the invalid document(s) anyway.


Formatter options are read from the configuration file, on top of that it is possible to specify overrides via the --option flag:

taplo fmt --option indent_tables=false foo.toml


It is possible to check whether the given files are properly formatted via the --check flag. When this flag is supplied, no formatting will be done.